Received: by 2002:aa6:c429:0:b029:98:93ff:f56f with SMTP id g9csp3392167lkq; Mon, 23 Nov 2020 04:39:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhRozLGJFZItRMYLqvV97WcKasMHwpf2jNZBEaanWyTmhKu36N0b7QLxH9DOq2QeEFIjml X-Received: by 2002:a17:907:b02:: with SMTP id h2mr16839363ejl.300.1606135172257; Mon, 23 Nov 2020 04:39:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606135172; cv=none; d=google.com; s=arc-20160816; b=ts6zZrGVU8RZ0OMehX3JVqIVBrLWvHZKycn1MhrdWeFRNhpHy7k+nOZhnFGBg42B12 FnNGTZxGzwXFDstuY8FjljkTT887WwLqVwVEBly286Zr/6k3LiuDTZ/ktwEv/Z5ZXGxv 5G5EgkXPIfuMS5s+s/bo+qV+ZLPQX+fNaLGiM8lpua9lXwvAMR7QW4wWSDAK9FZNQjhm LghIPug5KjCvoAKeyeBXO0q598Zvpghp0NrAdnfRxK1NV8nGbM8UVeitT9/uD7OrkCOA dlkrl7Lz8X4OgxcOxf2noPXOGIVsGBCSApXTGML/2Fk+PIQq34cuzUGDonhhi7QTiJ9g 26QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YKP1bFOdfxWm/V0KmbFpuXuJRhDdTMClCQokpJkbdNc=; b=JtWF9YmofYmbY7CuKMuBlk2bWRDj6ATQKoaMVyXzrG9Lt1wl8CQwfDUmsex789oCsT gM19eSd0Yugjsy8mvwxc94dgSKR/8d9WEWu5M4iuFDThjf79DSAuBbDc7pAyoPtMB5LJ q9zVQS0s/6TM4jRL6ePLnajG2Q0EE6/Xes5xRjWXKX624BFPnV+9thPbKZshQRC6nsos mH65jSksjUVzMpSP24PjKkrCPe3Ea9JcBjsAVRH2YP92DRlIHuJBa2+RUCnTX5+j7rx1 SvhBLQ/iOkxc0+snUQo3ndGG5OLFw8G2hFwYsZ5VOAOxJ0bOKppELzZD+wSHsdvAUhC9 yBMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lreYiY1o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si7001928ejm.476.2020.11.23.04.39.09; Mon, 23 Nov 2020 04:39:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lreYiY1o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731123AbgKWMgP (ORCPT + 99 others); Mon, 23 Nov 2020 07:36:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:48112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731643AbgKWMgI (ORCPT ); Mon, 23 Nov 2020 07:36:08 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62DAF21D7A; Mon, 23 Nov 2020 12:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134967; bh=X//zobSDZ3L331AYD4tAv4j4HKY0XYtevooqjRZONoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lreYiY1omPCWi6FGFqIdZcVnK6zOHS+rAEusS6+NNMzh4ZM85syrSYhfSKFqcCoVR 4Uq22vCo/kGa5BzfeK0ylbrG8MyEJrq6UWmqEj48nl5qmHU6YtpyCGGUXDdi12F8Rd CJrqNui/5qSVhSru8rCWfD3uXZDwiUXrwU37swic= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Changzhong , Jakub Kicinski Subject: [PATCH 5.4 026/158] qlcnic: fix error return code in qlcnic_83xx_restart_hw() Date: Mon, 23 Nov 2020 13:20:54 +0100 Message-Id: <20201123121821.195455178@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121819.943135899@linuxfoundation.org> References: <20201123121819.943135899@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Changzhong [ Upstream commit 3beb9be165083c2964eba1923601c3bfac0b02d4 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3ced0a88cd4c ("qlcnic: Add support to run firmware POST") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605248186-16013-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -2251,7 +2251,8 @@ static int qlcnic_83xx_restart_hw(struct /* Boot either flash image or firmware image from host file system */ if (qlcnic_load_fw_file == 1) { - if (qlcnic_83xx_load_fw_image_from_host(adapter)) + err = qlcnic_83xx_load_fw_image_from_host(adapter); + if (err) return err; } else { QLC_SHARED_REG_WR32(adapter, QLCNIC_FW_IMG_VALID,