From patchwork Sun Oct 15 11:45:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Henzl X-Patchwork-Id: 733987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDA13CDB47E for ; Sun, 15 Oct 2023 11:46:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbjJOLq1 (ORCPT ); Sun, 15 Oct 2023 07:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjJOLq0 (ORCPT ); Sun, 15 Oct 2023 07:46:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32AFFD9 for ; Sun, 15 Oct 2023 04:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697370338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=YqcbHfKQoNnigpEqF2VEQ86k5E3bTyWaCYVPfGFOm/c=; b=ESFZ1DTep9aE+ic9rkOt32VvM9bNNAzG+ex2JG01ceGfH3yo0cWF8mOEUzlZe0G/2pheep fZzAy2oiDkwqit12NL/wsAyvOpUr2XQvI78G0l+lHKCk5T/lirEdbi5wl3De0ifHUSP6BF wQ5AWXzFmllRVbyKheqeop9IETwmyM4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-lyZ_TUSbPD2IO9R8jufA0Q-1; Sun, 15 Oct 2023 07:45:31 -0400 X-MC-Unique: lyZ_TUSbPD2IO9R8jufA0Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 235A029AA2C9; Sun, 15 Oct 2023 11:45:31 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.45.224.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 676951C060AE; Sun, 15 Oct 2023 11:45:30 +0000 (UTC) From: Tomas Henzl To: linux-scsi@vger.kernel.org Cc: sreekanth.reddy@broadcom.com, ranjan.kumar@broadcom.com, sathya.prakash@broadcom.com Subject: [PATCH] mpt3sas: fix in error path Date: Sun, 15 Oct 2023 13:45:29 +0200 Message-ID: <20231015114529.10725-1-thenzl@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The driver should be deregistered as misc driver. Signed-off-by: Tomas Henzl --- 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 9af7a7e24474..107e608e2c41 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -12914,8 +12914,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; }