mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
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:
parent
25cba909ad
commit
573eb4a341
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue