From patchwork Mon Jan 13 20:21:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 3480321 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7279BC02DC for ; Mon, 13 Jan 2014 20:22:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B931C2015E for ; Mon, 13 Jan 2014 20:22:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7A5F20160 for ; Mon, 13 Jan 2014 20:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752195AbaAMUWb (ORCPT ); Mon, 13 Jan 2014 15:22:31 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:37453 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbaAMUWZ (ORCPT ); Mon, 13 Jan 2014 15:22:25 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so3576541eaj.12 for ; Mon, 13 Jan 2014 12:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7dBSF8L0q/Q9mFKpkJL4pO5bKa7ei+KzHMr/jaWECA8=; b=tPttxhaxHrB8y9ycR5KM6496MYwPKumbAf7kXFC8ZrzEcvmMMbzEzKu/0Sp4XfzJBF fBusyhg6YwG0B7OfO3V7EdVbNbto44lb4OTGOhbcWQlN1wE77vXkJBy4ZQkXxl0HzHsM aAh8G+R2KpP0ShNFHrqqiUloYo9wv7LAyDhUw3ZWLa+A7sxgaww7mTlgjDWIHFaiXj90 FrNhGy2VlB9xwJ3dizD5AA7LKLA5gYXkTEmCJIq722caRPAonXvk+9Pf0K/r4ubXZOEt OH43gBYSdTyai9D6HU1a4RreoYngdVAOS9RLrIaJ0RyGkuJtHNSe9AX4m4dJHEWHha8n mgEg== X-Received: by 10.14.251.132 with SMTP id b4mr30237732ees.78.1389644544296; Mon, 13 Jan 2014 12:22:24 -0800 (PST) Received: from localhost.localdomain (89-139-17-131.bb.netvision.net.il. [89.139.17.131]) by mx.google.com with ESMTPSA id 4sm42757579eed.14.2014.01.13.12.22.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Jan 2014 12:22:23 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Eytan Lifshitz , Emmanuel Grumbach Subject: [PATCH 16/18] iwlwifi: mvm: fix theoretical uninitialized function return value Date: Mon, 13 Jan 2014 22:21:55 +0200 Message-Id: <1389644517-22807-16-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <52D44A46.4000805@gmail.com> References: <52D44A46.4000805@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eytan Lifshitz If we try to write NVM that do not exist, the function will return uninitialized value. fixed. Signed-off-by: Eytan Lifshitz Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/nvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c index 9affd43..35b71af 100644 --- a/drivers/net/wireless/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c @@ -392,7 +392,7 @@ out: /* Loads the NVM data stored in mvm->nvm_sections into the NIC */ int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm) { - int i, ret; + int i, ret = 0; struct iwl_nvm_section *sections = mvm->nvm_sections; IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n");