Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp295376pxa; Thu, 27 Aug 2020 02:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5kgg92dWmChP5IJLhDlq8y5P1Tg/+/Rtl59xtWJs2o2rlvKqtc8YlLtR2drv8CoMuzoKE X-Received: by 2002:a17:906:c7cd:: with SMTP id dc13mr19653761ejb.446.1598520679709; Thu, 27 Aug 2020 02:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598520679; cv=none; d=google.com; s=arc-20160816; b=ZdNbY0fOgQ9adHIiP+k2ZWkEynFKvC9VH4Yq49z3cgpAVIQMYHBCZJzVQFyZPeHqEq SAbJeX7py8x7yJv9jMZChaZYwwk7ScIM1Q7h/HMconLy7wkllEd+QVI1ZNQQj/GpV9ez VeHxowDmuoxfZM7T4pMrvFwNncRpbpmjNZMqEl92oUbmFVt28xTZfh/NGWgEVmFtVzNf UjkrR4C+GXY61jQLJMD4wvmhafNSJpxLjH4OcFlxEhbQepwmxhaJqdcBPhNONMqUwLi5 TGxnS7TINOOk98i9sE7ADttYP+zMgcCtRGbKxC+alzZGgPJVbE8yl0wKmLhv7AvC3wiE VoJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=h8dvG6S8ki8+POJ5f1YF+xubJLt1YY9Q4WK4v03Tkqc=; b=cS0/pXNpVq1xdmRdDIm6X55kKnNIuRPkgmAol80yub+tNHmpWDF6MBDRpclGfV/oFg sNYAy37SiE5B1Dafo6Vg306oM1rMdkXvjPCKBzsVUZ2OoHn0Pg+kO/X/z3LJkU/HFLH2 eTz/mSn4aGLotIdDFv4YC87G7DOW51Icej73PPbjv21MPYXZdaOxF/AAOuXXY9UcC7yF 9BpfercbETpBXkKavv8Jfvdzzw5Syf9L4ufx5GOHjNo7bE2yDARF30Jx71rCYBy7gu3n NX65eOnHVkCACPj8r1AgL+t7eXvrFtZKlr7owZV7W+F+1rcv3wByFt+R3B1PkfkYTk4J hQ3Q== 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 r5si1132671edo.295.2020.08.27.02.30.56; Thu, 27 Aug 2020 02:31:19 -0700 (PDT) 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 S1728451AbgH0J20 (ORCPT + 99 others); Thu, 27 Aug 2020 05:28:26 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:47096 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728655AbgH0J2X (ORCPT ); Thu, 27 Aug 2020 05:28:23 -0400 Received: from localhost.localdomain (unknown [159.226.5.100]) by APP-05 (Coremail) with SMTP id zQCowAD3_qIwfEdf8HigBQ--.51922S2; Thu, 27 Aug 2020 17:26:08 +0800 (CST) From: Xu Wang To: QLogic-Storage-Upstream@cavium.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: qedi: Remove redundant null check Date: Thu, 27 Aug 2020 09:26:06 +0000 Message-Id: <20200827092606.32148-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAD3_qIwfEdf8HigBQ--.51922S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr4xAFWUAw4DZrWfZw1UZFb_yoW3uwc_CF W0vry7Kr1xtr4fCw10qr45Zryvyrsruw18uFyIgr1IyFWIgwnrXF42vFn8Xr98ua1UJa47 JF1UAF1qk3WUujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb2AYjsxI4VWkCwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r45tVCq3wAv7VC2z280aVAFwI0_Gr8l6r yjowAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc2xSY4AK67AK6r4fMxAI w28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr 4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxG rwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY 6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jpUDJUUUUU= X-Originating-IP: [159.226.5.100] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiAw4BA13qZVAhdAAAsY Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because kfree_skb already checked NULL skb parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- drivers/scsi/qedi/qedi_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 6f038ae5efca..e42437ec23a8 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -789,8 +789,7 @@ static void qedi_ll2_free_skbs(struct qedi_ctx *qedi) spin_lock_bh(&qedi->ll2_lock); list_for_each_entry_safe(work, work_tmp, &qedi->ll2_skb_list, list) { list_del(&work->list); - if (work->skb) - kfree_skb(work->skb); + kfree_skb(work->skb); kfree(work); } spin_unlock_bh(&qedi->ll2_lock); -- 2.17.1