Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp731198imm; Thu, 13 Sep 2018 06:58:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbnl1pmqSFdo0jjEYTEEvtREQmrffMLu8mEiCFrwOXGozkYjg/qLz7DwYZPyqlxcUV4XVAU X-Received: by 2002:a63:f849:: with SMTP id v9-v6mr7306626pgj.71.1536847130879; Thu, 13 Sep 2018 06:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847130; cv=none; d=google.com; s=arc-20160816; b=PF5k1LCBSQGt6f5BsLa9jri4iYmnrQsoCh7qQWHF4AgopcxntUQeVG0QJ1NLi7WmHD okZH1X7ppFbU0SZ0p5gw+m3eKI8QgBjOMebLnDk5h9f7cHEAk+Xwm0bdcZcATg84L+UN F+Bf9twKdxq5jQDCnne/qQNICAWDQf2wwNNf/t0tovgzo70pmJiAyIXv/8y+newG4mOt 8wzqYezUejcBg1hPkn3IIiAZ0ihWqBK+bykO16I4F3pnL6d4cSiAbaWLxhLELxjbCt/x LByuaMPoUPml/iQB6dohFYlotMq+F1J6iqWbwWMevp8HabW6QrdN8PlsGd3ijllUq3FY oWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=jxkjuifqC90sFw02eZHeEzzzVtd27y8UWgA6T74vTxI=; b=etdImHvxW5u/Z3rMWFfNzf3r9U9Er58vVUInYJOYbMCbafVFIDDWU7jR0iz3fhmRGa 622MTBYr4OFUOgtmpvR/c9cQlJAOQA/Ehdct5myXa8lIXhaM6xCnjWgOLYOexk6QfeIk Rv7/gycYHmXyzWxbVHr9OVBeBJhw5R8UbaSBbiLKET/tkZDHbda+26GDNpmJt0vcENhC A5WT0rWddPzp5Gju6NeERJvdNLf5dweECJnt8VNmMOQ0srFtKGfmqSxMSmKcsp81xBgq HW1MOwBXuhFyhNlewUIH2vOqV00VDSslGSwOfBfAjqg/xOyYSgbqS0BFUbNIKIvPrwHZ lR0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 137-v6si4294790pfx.155.2018.09.13.06.58.35; Thu, 13 Sep 2018 06:58:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731262AbeIMTIE (ORCPT + 99 others); Thu, 13 Sep 2018 15:08:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34548 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728566AbeIMTID (ORCPT ); Thu, 13 Sep 2018 15:08:03 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 67FF8D0E; Thu, 13 Sep 2018 13:58:26 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Johannes Thumshirn , John Garry , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.18 107/197] scsi: aic94xx: fix an error code in aic94xx_init() Date: Thu, 13 Sep 2018 15:30:56 +0200 Message-Id: <20180913131845.830323396@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit 0756c57bce3d26da2592d834d8910b6887021701 ] We accidentally return success instead of -ENOMEM on this error path. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Signed-off-by: Dan Carpenter Reviewed-by: Johannes Thumshirn Reviewed-by: John Garry Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/aic94xx/aic94xx_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- 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 = -ENOMEM; goto out_destroy_caches; + } err = pci_register_driver(&aic94xx_pci_driver); if (err)