Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2422746rdh; Sun, 29 Oct 2023 15:58:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqBSgD/0c68+9anSK/YLR0J/NOYidSzcteAwg7hJ5N2LIu/BljIXtk0r3UWIy4z+YjZs5f X-Received: by 2002:a92:c244:0:b0:357:f730:cc4c with SMTP id k4-20020a92c244000000b00357f730cc4cmr11379385ilo.6.1698620287255; Sun, 29 Oct 2023 15:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698620287; cv=none; d=google.com; s=arc-20160816; b=uqpdV8qJs8bjW6c2MJi7es26+iwdifdSWzpcjOFHLbvo92oo2AXM2vk5171iTl/Qgc yCPk32A9F2e56UC65KBjTlYKWOmo+NTw+szSJyjy4ItlEXzWCnNqWBfxidzdJIbd5QHX XX2FdjMtUKMZ2uwCGQt1xeqC+d2QQhX1bsXQs/OZ++CHf3nqD/e+Cxshkm+VlwlAZIO+ dpTguXpDtF0i8NUijpaiy8VnPfd5ezMihzOD9ZJfI8szbDfaPuritiPXHOn7d91Ng5D8 BFKct7DxT8NdSN+DNa1FTrGd/f6ojoNakRi90bsEluxHOQQ7SA+oddSKh7RTXzIcvX+e aaeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=K0i6WpzjD/gRyhrdsWGjTs7pTfc7hiNPRXYgcnuhhS0=; fh=6Iti4mFKDuCLOGYP9DjL8neWcPvhWSyP5gcGhPYfFvc=; b=QCXBUvT6MhinsXMuxJ1L2TmaFVQjVTB6zk8JZzuoFqyiudlx+620an9OdV6mgwrgik f5QR81JfbRzaknsFb72gwmzzH1SwTInMJhUDeoUj5couX3ajuHgZUpgjrGHehIvAVfr2 3jyVHwSIYMTjT+Vn/fEEuKWltWYEXcEU2lKqplKRNy1BosT36/UtX4GUAo5Yh+V1gfGe RI/vfKidajHVnwFwm7x48M+lHzDw6venRZiqJnLZ7z7oDfSLoSFsntWDM8LmAovxUl/F Tmo1ydPGRNjpDVg3p/fBFz/IYG3nsSATo76Y/oOoFybfAfQZQv747+djOpC7ahOU2YSa NhqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ur6nmGZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h8-20020aa79f48000000b006be322191dasi4100568pfr.140.2023.10.29.15.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ur6nmGZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A369B8057E5D; Sun, 29 Oct 2023 15:58:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231316AbjJ2W5n (ORCPT + 99 others); Sun, 29 Oct 2023 18:57:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231317AbjJ2W5g (ORCPT ); Sun, 29 Oct 2023 18:57:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEC482D66; Sun, 29 Oct 2023 15:56:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 273E1C433C7; Sun, 29 Oct 2023 22:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620167; bh=SmAfp3kOohRIg6+CIK84XG6g7rBs2b58xhlju/dX6cs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ur6nmGZ9YhxZ28k3wm8sLPGSQ/P/OBE8SIzHTiO1g4KYo/Tkcnqm1Q6/77Nrr1pDT kc+J1AxlRBjOFdKgjYQfahsenCknO2g2Xr8yXRRvAxd2EAPBh17TgI2ADV5RNieQFq h6TPXKMW9yj2Br70ANxpcxQeKGApaaTWOwS5yxtOcH7JcAasdNbRqnCJFnICfBWIzY bBKxRzWBEcHaRp9P+BwYveP7g0w64fB0SvlcUfH91NuCkSqiHdoRMOtIOZnSqU/a7a E0D1v83kV638AtXe2inXuYB9yj9Uz3/hZPr4cgqSQZu3DSUFwXdmYxG1B6bUShrDq6 1yn0Q2IokPn2A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomas Henzl , "Martin K . Petersen" , Sasha Levin , sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com, jejb@linux.ibm.com, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 6.5 36/52] scsi: mpt3sas: Fix in error path Date: Sun, 29 Oct 2023 18:53:23 -0400 Message-ID: <20231029225441.789781-36-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029225441.789781-1-sashal@kernel.org> References: <20231029225441.789781-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.5.9 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 29 Oct 2023 15:58:04 -0700 (PDT) From: Tomas Henzl [ Upstream commit e40c04ade0e2f3916b78211d747317843b11ce10 ] The driver should be deregistered as misc driver after PCI registration failure. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20231015114529.10725-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index c3c1f466fe01d..605013d3ee83a 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -12913,8 +12913,10 @@ _mpt3sas_init(void) mpt3sas_ctl_init(hbas_to_enumerate); error = pci_register_driver(&mpt3sas_driver); - if (error) + if (error) { + mpt3sas_ctl_exit(hbas_to_enumerate); scsih_exit(); + } return error; } -- 2.42.0