From patchwork Tue Oct 27 13:50:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 306936 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 98596C55178 for ; Tue, 27 Oct 2020 18:12:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48502207BB for ; Tue, 27 Oct 2020 18:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603822377; bh=ADwdWwiFKwBdtf3Rz+fuqdN20bUstmwYzptpeS9bQj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=v5JsEI7RhE+X2CDIYiSCqnIkKc/XguDgjP6XX8PKGRbPyN0HZD2xCT4w1KBN374Zz FtlwWjG8kkLPGM5DZYiD0ymT6FpnGiw9hNWxXd4nsKbwz+q8bGH6SFWZ0jeB2IyUMX G0kdw8FUg5aEoCbbC7I33H4of4g4Avo8hNzfERxc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1825581AbgJ0SLd (ORCPT ); Tue, 27 Oct 2020 14:11:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:36804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755609AbgJ0OPC (ORCPT ); Tue, 27 Oct 2020 10:15:02 -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 C18002076A; Tue, 27 Oct 2020 14:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808102; bh=ADwdWwiFKwBdtf3Rz+fuqdN20bUstmwYzptpeS9bQj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x31dIYmeDUWsvLL+yRlW+/aH7WOGogcn5fp7h86LHBKjV+eNMMlGGE6Re2WwjrHDM 7+gF/t77pGVB402Z+LWAVMyCc11wqRLXYOr0vEgA/2bUIXDACJJvu3/UDmKBW+ZOOi lFetyFvNjAp3KiJ5teDf02dUwIcjdZ1SCBAwcgUg= 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.14 157/191] scsi: mvumi: Fix error return in mvumi_io_attach() Date: Tue, 27 Oct 2020 14:50:12 +0100 Message-Id: <20201027134917.265126654@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 fe97401ad1927..1fffa301c1b9f 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2439,6 +2439,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; }