From patchwork Tue Oct 27 13:50:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 313043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A06F6C55179 for ; Tue, 27 Oct 2020 14:11:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67E4D2072D for ; Tue, 27 Oct 2020 14:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807871; bh=K1cOy7GnGWxE5vzIESe07CVhqy2mhR1U79X/UZxUqgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=T9q1CjlEqhUL1SQ7YcoEOOwY6C3QDQV7m8PrhvgpeJSV4sw8MaVaVpw7oVvz1f12R 1cfY5KcA8gc2aI0ikINot8LVozWF483/baxDCL1+UM1Zyl/trE2KFwYXIouyveSwCY gCrmwP+uZZnoGmNuMazF/5aLI1w/vsbQhCUdBHh8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754708AbgJ0OGl (ORCPT ); Tue, 27 Oct 2020 10:06:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:55048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754661AbgJ0OGg (ORCPT ); Tue, 27 Oct 2020 10:06:36 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6B5F22263; Tue, 27 Oct 2020 14:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807596; bh=K1cOy7GnGWxE5vzIESe07CVhqy2mhR1U79X/UZxUqgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Avu7dRlV5NxPjtX6cFuJD9Tw55I6/BblsycttbQaG+FKCJDrPgpP7CzOaieYaasNV SLClMdfX9ctTyOWaxgEx/uMTXHHd0glYsnTksmTqBZlh6SaTPQZTkDpBlgo/IumxBF KM0eovS4t+KfnRGMMmiLSA7XWsz15DYIJ4cQ7pj0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.9 111/139] scsi: mvumi: Fix error return in mvumi_io_attach() Date: Tue, 27 Oct 2020 14:50:05 +0100 Message-Id: <20201027134907.413628383@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jing Xiangfeng [ Upstream commit 055f15ab2cb4a5cbc4c0a775ef3d0066e0fa9b34 ] Return PTR_ERR() from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200910123848.93649-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/mvumi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 39285070f3b51..17ec51f9d9880 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2476,6 +2476,7 @@ static int mvumi_io_attach(struct mvumi_hba *mhba) if (IS_ERR(mhba->dm_thread)) { dev_err(&mhba->pdev->dev, "failed to create device scan thread\n"); + ret = PTR_ERR(mhba->dm_thread); mutex_unlock(&mhba->sas_discovery_mutex); goto fail_create_thread; }