diff options
author | Su Hui <[email protected]> | 2023-12-01 10:59:54 +0800 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2023-12-05 21:18:40 -0500 |
commit | 573eb4a3410a9d4e0612cca50e2c67a46c3824f0 (patch) | |
tree | 717ed6738d142fec0426e188c2566fa54e054af5 | |
parent | 25cba909ade2a24f7356dc547dc417042bcef722 (diff) |
scsi: aic7xxx: Return negative error codes in ahc_linux_register_host()
ahc_linux_register_host() returns both positive and negative error codes.
It's better to make this function only return negative error codes.
Signed-off-by: Su Hui <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 4ae0a1c4d374..b0c4f2345321 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -1085,7 +1085,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa template->name = ahc->description; host = scsi_host_alloc(template, sizeof(struct ahc_softc *)); if (host == NULL) - return (ENOMEM); + return -ENOMEM; *((struct ahc_softc **)host->hostdata) = ahc; ahc->platform_data->host = host; |