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>
This commit is contained in:
Su Hui 2023-12-01 10:59:54 +08:00 committed by Martin K. Petersen
parent 25cba909ad
commit 573eb4a341

View file

@ -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;