From patchwork Wed Aug 8 11:56:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10559811 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 B715D1057 for ; Wed, 8 Aug 2018 11:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A25F32A975 for ; Wed, 8 Aug 2018 11:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 941CC2A97B; Wed, 8 Aug 2018 11:56:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 3AF2E2A975 for ; Wed, 8 Aug 2018 11:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbeHHOQQ (ORCPT ); Wed, 8 Aug 2018 10:16:16 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:42712 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbeHHOQQ (ORCPT ); Wed, 8 Aug 2018 10:16:16 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w78BsIip034152; Wed, 8 Aug 2018 11:56:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=1Zh/xCT0/XMUiQtEd7uSum9LZbQzgpjytlQmN7gfBwg=; b=KcnosBC8kKTSjvEh5sFnmpsys+AsRFZokheURQ1FuVb9CxGIb1vHnoDykiHKAcQEBZco kHsU2GMsmmF8AXbekptdECD4qKA+vcDQLELSVDO65PbU8eDfTorTtqaUgF3pGIM1FbpP QQgc7gVraaARLrW7+du74B1XzLlUIHafJ5o3VCIzl0S9iBwj6V9RjviuFLBfDq+JPMG6 53cb7weZ4RKS8sm+9wrUJv34PhRw9SkNQ8vijtaZFFKg34NeYsK7oT+VjJDghFk9DJ6P 0PpCD6ljDu8cbp9Cut9NYpjX44DJ3WvCoBAOFoK8lur5/LzBSunv7zQnEWvq6vjbpoQ0 Kw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2kn1nd5jqs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 Aug 2018 11:56:50 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w78BunPm004118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Aug 2018 11:56:49 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w78BumHc001138; Wed, 8 Aug 2018 11:56:48 GMT Received: from kili.mountain (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 Aug 2018 04:56:48 -0700 Date: Wed, 8 Aug 2018 14:56:40 +0300 From: Dan Carpenter To: "James E.J. Bottomley" Cc: "Martin K. Petersen" , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] scsi: aic94xx: fix an error code in aic94xx_init() Message-ID: <20180808115640.at6qjutsykgexdt4@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8978 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=458 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808080124 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 We accidentally return success instead of -ENODEV on this error path. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Signed-off-by: Dan Carpenter Reviewed-by: Johannes Thumshirn diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 80e5b283fd81..cb8191afc1dc 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -1030,8 +1030,10 @@ static int __init aic94xx_init(void) aic94xx_transport_template = sas_domain_attach_transport(&aic94xx_transport_functions); - if (!aic94xx_transport_template) + if (!aic94xx_transport_template) { + err = -ENODEV; goto out_destroy_caches; + } err = pci_register_driver(&aic94xx_pci_driver); if (err)