Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp446187pxb; Tue, 3 Nov 2020 03:59:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQ8xyx53ZdY3CZg2FLpDQ0mxdz/qI6WzoIAEGADAuD8imO4uF/jTK9b0GpTAikpbDgL3au X-Received: by 2002:a17:906:d0cc:: with SMTP id bq12mr19486208ejb.127.1604404790246; Tue, 03 Nov 2020 03:59:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604404790; cv=none; d=google.com; s=arc-20160816; b=vbVhbllP21U/DmsTOl79QTtH3CYuYVHucC5veoawq41qywpjQQUcXfPKcUA+HxtxW8 X8mTz9yNLIUj04UrbDcEweMot1N3H+8l0hUAwd2EcUWY8mUASAD53NN9lKzcAVYqVIc/ wEBQvFr3poVnv5YgxK1bxBDerXFZmJDZ416GZR7GFZcIntCLustKVfYyOVpo70ih5da5 jUEgrQYGsVXVXDlJQezW4DrK3SIoODILyVAcXfwH7OqjEEl65tqLAYC7UGqgtXC31MA3 W7FWde2nF6qichC2QPRJNTnqYu7v2IqUWeIiLfUr/sBaqFDy0+aVkpboQDpyn+bNqf52 hiag== 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 :message-id:date:subject:cc:to:from; bh=6LQMo0d0hyP27rvShuKFRmGBbj2oiegg/nulQp1QLdI=; b=Sf1QI5eXfJzYRQZb0HapSp/UwPHgD51VuELqA8YGrJTs2tMu8KaOsa0qkKkLjyW7mN sf07Q8y75I5TWuQQIYaWlm5/ORgcu2kJhOC4nkZscTKIAk8VBxYWjZ/W/NsUOp02hdbf FmJPzErJ7txUADAzc2TCSSDzoJEiMXXcHsl4x+RGG2PPDUUcFzEL/hgFEUb1oidG2eZg 5C7jVHhiKpnZ0H8KBLoj+EDd/NDmZNRzvfoIID2SHoLCDLyouncTxmv6m6F4bS3ToMLy LIMYfK+DXmc2MvVY1Gv0RuKbNsStXEN8y3aEjsCIOcyBEHjeFROBftZ7b+FziCToFye+ cHGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si9320364ejz.82.2020.11.03.03.59.27; Tue, 03 Nov 2020 03:59:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728741AbgKCL4f (ORCPT + 99 others); Tue, 3 Nov 2020 06:56:35 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6696 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbgKCL4f (ORCPT ); Tue, 3 Nov 2020 06:56:35 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CQStR0xXvz15QX0; Tue, 3 Nov 2020 19:56:31 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 3 Nov 2020 19:56:26 +0800 From: Jing Xiangfeng To: , CC: , , Subject: [PATCH] scsi: qla4xxx: Remove redundant assignment to variable rval Date: Tue, 3 Nov 2020 20:01:37 +0800 Message-ID: <20201103120137.109717-1-jingxiangfeng@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variable rval has been initialized with 'QLA_ERROR'. The assignment is redundant in an error path. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/qla4xxx/ql4_os.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 676778cbc550..aaccbf71dff5 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -686,7 +686,6 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha, if (!ha->chap_list) { ql4_printk(KERN_ERR, ha, "CHAP table cache is empty!\n"); - rval = QLA_ERROR; goto exit_get_chap; } @@ -698,14 +697,12 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha, if (chap_index > max_chap_entries) { ql4_printk(KERN_ERR, ha, "Invalid Chap index\n"); - rval = QLA_ERROR; goto exit_get_chap; } *chap_entry = (struct ql4_chap_table *)ha->chap_list + chap_index; if ((*chap_entry)->cookie != __constant_cpu_to_le16(CHAP_VALID_COOKIE)) { - rval = QLA_ERROR; *chap_entry = NULL; } else { rval = QLA_SUCCESS; -- 2.17.1