From patchwork Tue Nov 7 13:01:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10046667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A632360360 for ; Tue, 7 Nov 2017 13:01:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 921FF2948B for ; Tue, 7 Nov 2017 13:01:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85D1829BB2; Tue, 7 Nov 2017 13:01:52 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 08E022948B for ; Tue, 7 Nov 2017 13:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932835AbdKGNBt (ORCPT ); Tue, 7 Nov 2017 08:01:49 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:39055 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932706AbdKGNBt (ORCPT ); Tue, 7 Nov 2017 08:01:49 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA7D1heX016820 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 13:01:43 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vA7D1gbw023038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 13:01:43 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA7D1gEv001598; Tue, 7 Nov 2017 13:01:42 GMT Received: from mwanda (/129.205.6.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Nov 2017 05:01:41 -0800 Date: Tue, 7 Nov 2017 16:01:32 +0300 From: Dan Carpenter To: Don Brace Cc: "James E.J. Bottomley" , "Martin K. Petersen" , esc.storagedev@microsemi.com, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] scsi: hpsa: remove an unecessary NULL check Message-ID: <20171107130131.3zohbeoobjxbqmdz@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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 device->scsi3addr[] is an array, not a pointer, so it can't be NULL. I've removed the check. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 287e5eb0723f..b0aa5dc1d54c 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -8223,8 +8223,6 @@ static void hpsa_set_ioaccel_status(struct ctlr_info *h) if (!device) continue; - if (!device->scsi3addr) - continue; if (!hpsa_vpd_page_supported(h, device->scsi3addr, HPSA_VPD_LV_IOACCEL_STATUS)) continue;