mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Su Hui <suhui@nfschina.com>
To: dan.carpenter@linaro.org, hare@suse.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com
Cc: Su Hui <suhui@nfschina.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [PATCH v2 2/3] scsi: aic7xxx: return ahc_linux_register_host()'s value rather than zero
Date: Fri,  1 Dec 2023 10:59:55 +0800	[thread overview]
Message-ID: <20231201025955.1584260-3-suhui@nfschina.com> (raw)
In-Reply-To: <20231201025955.1584260-1-suhui@nfschina.com>

ahc_linux_register_host() can return error code if failed.
So ahc_linux_pci_dev_probe() should return the value of
ahc_linux_register_host() rather than zero.

And the last patch made ahc_linux_register_host() return negative error
codes, which makes sure ahc_linux_pci_dev_probe() returns negative error
codes.

Signed-off-by: Su Hui <suhui@nfschina.com>
---
 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index a07e94fac673..198440dc0918 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -241,8 +241,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		ahc_linux_pci_inherit_flags(ahc);
 
 	pci_set_drvdata(pdev, ahc);
-	ahc_linux_register_host(ahc, &aic7xxx_driver_template);
-	return (0);
+	return ahc_linux_register_host(ahc, &aic7xxx_driver_template);
 }
 
 /******************************* PCI Routines *********************************/
-- 
2.30.2


  parent reply	other threads:[~2023-12-01  3:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01  2:59 [PATCH v2 0/3] scsi: aic7xxx: fix some problem of return value Su Hui
2023-12-01  2:59 ` [PATCH v2 1/3] scsi: aic7xxx: return negative error codes in ahc_linux_register_host() Su Hui
2023-12-01  2:59 ` Su Hui [this message]
2023-12-01  2:59 ` [PATCH v2 3/3] scsi: aic7xxx: return negative error codes in aic7770_probe() Su Hui
2023-12-03 10:34   ` Christophe JAILLET
2023-12-03 10:36     ` Marion & Christophe JAILLET
2023-12-01  7:53 ` [PATCH v2 0/3] scsi: aic7xxx: fix some problem of return value Dan Carpenter
2023-12-05  3:33   ` Su Hui
2023-12-05  8:14     ` Dan Carpenter
2023-12-05  8:28       ` Su Hui
2023-12-06  2:18 ` Martin K. Petersen
2023-12-14  4:29 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201025955.1584260-3-suhui@nfschina.com \
    --to=suhui@nfschina.com \
    --cc=dan.carpenter@linaro.org \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®