Commit 573eb4a3 authored by Su Hui's avatar Su Hui Committed by Martin K. Petersen
Browse files

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: default avatarSu Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231201025955.1584260-2-suhui@nfschina.com


Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 25cba909
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;