Skip to content

Commit 573eb4a

Browse files
Su Huimartinkpetersen
authored andcommitted
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 <suhui@nfschina.com> Link: https://lore.kernel.org/r/20231201025955.1584260-2-suhui@nfschina.com Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 25cba90 commit 573eb4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/aic7xxx/aic7xxx_osm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
10851085
template->name = ahc->description;
10861086
host = scsi_host_alloc(template, sizeof(struct ahc_softc *));
10871087
if (host == NULL)
1088-
return (ENOMEM);
1088+
return -ENOMEM;
10891089

10901090
*((struct ahc_softc **)host->hostdata) = ahc;
10911091
ahc->platform_data->host = host;

0 commit comments

Comments
 (0)