From patchwork Tue Oct 27 13:49:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 306869 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=unavailable 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 8E856C4363A for ; Tue, 27 Oct 2020 18:26:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 519EE20773 for ; Tue, 27 Oct 2020 18:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603823216; bh=K1cOy7GnGWxE5vzIESe07CVhqy2mhR1U79X/UZxUqgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=n4ek/fxCCO5VqlCuU3DLGtvVNRACKx1zyeSp/c2ypX2wQQ/q+IlDBwDs+FRrWGQbD r2TW1HBO2yM0KNkFj108CBX/7jML8btt7QEUarAK03LvKvtRy9zo6FO+mHCeFd14Hi AUJpCEhQgsgRk8P4humPHcu5nLmiN8mGlo3bilAY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1827691AbgJ0S0r (ORCPT ); Tue, 27 Oct 2020 14:26:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:47996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389214AbgJ0OAb (ORCPT ); Tue, 27 Oct 2020 10:00:31 -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 74E8822258; Tue, 27 Oct 2020 14:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807231; bh=K1cOy7GnGWxE5vzIESe07CVhqy2mhR1U79X/UZxUqgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gDKYm0G3oMtRQMnHVT3kwmxBdPxN71BLGsMN3VQBpu03O7Vi+qH/lpSWzxjgZnwIy ULyQP7ZaaIlMhoYsvd50pfJBNTvYEQIR2l+SE3zk+TYPJAxHDQRB1jOi2X8D5SdH/5 X4kM6Nl8xmLGAIc0OzoSJhXd/soW6xy3g2SjYtkw= 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.4 089/112] scsi: mvumi: Fix error return in mvumi_io_attach() Date: Tue, 27 Oct 2020 14:49:59 +0100 Message-Id: <20201027134904.758468194@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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; }