From patchwork Wed Apr 17 21:44:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCDAA17E0 for ; Wed, 17 Apr 2019 21:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A89A92867C for ; Wed, 17 Apr 2019 21:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D4AA287E5; Wed, 17 Apr 2019 21:45:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A1272867C for ; Wed, 17 Apr 2019 21:45:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387926AbfDQVpH (ORCPT ); Wed, 17 Apr 2019 17:45:07 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40013 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387921AbfDQVpF (ORCPT ); Wed, 17 Apr 2019 17:45:05 -0400 Received: by mail-pg1-f195.google.com with SMTP id d31so148178pgl.7 for ; Wed, 17 Apr 2019 14:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wovk3eG2reJUvsCdEpO16z+YWx2eFLzYVwwM6g35epc=; b=LSiBN7QQ26u/Q3MalzBkQ9Crp3N0AxFx57vdZShDqGipARNZ7ZF707lZKuyqAcMsuO C6XezJIR76SRC5N8FELATqcJ901UZajQZut/tghzHQDbPrJQ6IUQqKyYIsjqr8b5quFV AG3ZP7SfkObmu+HXLp3QGywawrQ9RB5znYZYMPBU6C7AbDjASabXJJjBNcrkcHIoWeyq kkdaDcFRXYW/VP5ftzuq2Q7Runf65mV3GLI69KTCn7PWszFAxrQytEEvhhOiIUHVptEh CL1758ozYgkRZNSJAEgUA6+hJ62WvonwGWQ9BtjRqXO2ioCKkJYWAyhfqH7okLJkwfyf TMww== X-Gm-Message-State: APjAAAXCEn4pHN3BPrIolA+NOO9+BnMEcDOg1WD9gcfU6ZuTaia40OOU 8+VKyUit3hQFpVooKicy7Cc= X-Google-Smtp-Source: APXvYqxnXcntS9s+q5nbsu1gkjKRJjbXdMaRWiA11AQ4anmA5ye+SYWoaKbE8T4i4ZxuVsAbB2YHSQ== X-Received: by 2002:a63:f707:: with SMTP id x7mr86151794pgh.343.1555537505110; Wed, 17 Apr 2019 14:45:05 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:04 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 09/34] qla2xxx: Remove the fcport test from qla_nvme_abort_work() Date: Wed, 17 Apr 2019 14:44:18 -0700 Message-Id: <20190417214443.243152-10-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Testing whether a pointer is not NULL after it has been dereferenced is not useful. Hence remove the if (fcport) test. This was detected by Coverity. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_nvme.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 8dd6220857d4..5d9191278f41 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -186,10 +186,9 @@ static void qla_nvme_abort_work(struct work_struct *work) struct qla_hw_data *ha = fcport->vha->hw; int rval; - if (fcport) - ql_dbg(ql_dbg_io, fcport->vha, 0xffff, - "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n", - __func__, sp, sp->handle, fcport, fcport->deleted); + ql_dbg(ql_dbg_io, fcport->vha, 0xffff, + "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n", + __func__, sp, sp->handle, fcport, fcport->deleted); if (!ha->flags.fw_started && (fcport && fcport->deleted)) return;