From patchwork Fri May 5 19:46:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 98706 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp292945qge; Fri, 5 May 2017 12:48:56 -0700 (PDT) X-Received: by 10.98.218.15 with SMTP id c15mr18530106pfh.240.1494013736055; Fri, 05 May 2017 12:48:56 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si2698005pgk.367.2017.05.05.12.48.55; Fri, 05 May 2017 12:48:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755895AbdEETsy (ORCPT + 6 others); Fri, 5 May 2017 15:48:54 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:57557 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755712AbdEETsi (ORCPT ); Fri, 5 May 2017 15:48:38 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0MFUkm-1dIqAw3nZE-00EOxV; Fri, 05 May 2017 21:48:19 +0200 From: Arnd Bergmann To: Ben Hutchings Cc: stable@vger.kernel.org, Hannes Reinecke , James Bottomley , Arnd Bergmann Subject: [PATCH 3.16-stable 41/87] aic94xx: Skip reading user settings if flash is not found Date: Fri, 5 May 2017 21:46:59 +0200 Message-Id: <20170505194745.3627137-42-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170505194745.3627137-1-arnd@arndb.de> References: <20170505194745.3627137-1-arnd@arndb.de> X-Provags-ID: V03:K0:KHvCgfqWNhsD/gn9trYTZRpKxiv3qK72sF8uQnhy1ypOoSXDrQT 3TCuObPcxbgwipzmYgvJkkvZROcnrkITyx+JkyPJ27RpLvWDfeznKgRvCbM2pKa8uU2RgYI sSuhL2800r6YkcdpRtRI6G7ieKbR2rvynpRu9MZRim6UXfK0lHMpncCAb1YbI44qf4+9YQb Ae1dHoCwMhdScCOmHc+2Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:bz+UWA/qQ50=:TS5UNNPYyQsnoezsTxnuVY wFNS2n0k2FNhWMef8qOPrVy7qeuvOr70o5liQIo3ZkQWIpMSSy3/5lVd4CIUzDWnGzr1eQUAs yKavUf9oBXDf2/iXUId2vodByBdoopvvvpeGYGQTerulPSKe/2JNWZdvep5bHXY4r2zto/+l7 tQBkpEXU4ofKU2irg+CGntrN+ZzJ5aXLDVOn2fsabt/FdqVLbNR8j6gce4oJfGMyXcvgPdbmW FQ0oig371+rvf2VsOiPzInQ9132db3xvegwgN/XrPsyigP+/OQbjY1Ooj6N7lslV3nNhvgg38 0vHKH/CfXCzYy2A6sEjChiiiCIYK9zLZ5ZOeKgF+mSw/lFblxURAWuYUZmz2dRLcqDE8k+eaS hT8QglvqpEBFZAET45hm+T5HqXOEkf62ostTYjgeZ2cWGQdWEaJQd3eJO16C1tU6BumNlbVUj N3KuscY22aONA9FZ45SAY6LnnqLW92XPIVUBNbkUOkymFWW1bLyXiP/R1L8gsDURTaHGjd+8C mzxr/8oov4YI/GNaQYILiIHxxOnD/W3T7w/sDe1sOIA6BzQKZAW6s7Z6PehwoJzwkkLBtZsof arw/zVUYWb0Fr674WpnaS6v6qsXerFI000iO0xOs1fXL1kveOjvYXGYp5MLR9x1bE2S8qNkgx dqhQ8jOiP/nSg/QAMJnkejIINrlahpjlYOekJCvmnRCr38ot2bo3kM9sa4me5+JFvhlo= Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hannes Reinecke Commit 23efd4ea053c883d98e1cc12bb13319a62b9b045 upstream. If no user settings are found it's pointless trying to read them from flash. So skip that step. This also fixes a compilation warning about uninitialized variables in aic94xx. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: James Bottomley Signed-off-by: Arnd Bergmann --- drivers/scsi/aic94xx/aic94xx_sds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c index edb43fda9f36..c831e30411fa 100644 --- a/drivers/scsi/aic94xx/aic94xx_sds.c +++ b/drivers/scsi/aic94xx/aic94xx_sds.c @@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, { int err, i; u32 offs, size; - struct asd_ll_el *el; + struct asd_ll_el *el = NULL; struct asd_ctrla_phy_settings *ps; struct asd_ctrla_phy_settings dflt_ps; @@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, size = sizeof(struct asd_ctrla_phy_settings); ps = &dflt_ps; + goto out_process; } if (size == 0) @@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, ASD_DPRINTK("couldn't find ctrla phy settings struct\n"); goto out2; } - +out_process: err = asd_process_ctrla_phy_settings(asd_ha, ps); if (err) { ASD_DPRINTK("couldn't process ctrla phy settings\n");