All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init()
@ 2018-08-08 14:29 Dan Carpenter
  2018-08-08 16:07 ` John Garry
  2018-08-09  1:18 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-08-08 14:29 UTC (permalink / raw)
  To: kernel-janitors

We accidentally return success instead of -ENOMEM on this error path.

Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: return -ENOMEM instead of -ENODEV

diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 80e5b283fd81..cb8191afc1dc 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -1030,8 +1030,10 @@ static int __init aic94xx_init(void)
 
 	aic94xx_transport_template  		sas_domain_attach_transport(&aic94xx_transport_functions);
-	if (!aic94xx_transport_template)
+	if (!aic94xx_transport_template) {
+		err = -ENOMEM;
 		goto out_destroy_caches;
+	}
 
 	err = pci_register_driver(&aic94xx_pci_driver);
 	if (err)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init()
  2018-08-08 14:29 [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init() Dan Carpenter
@ 2018-08-08 16:07 ` John Garry
  2018-08-09  1:18 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: John Garry @ 2018-08-08 16:07 UTC (permalink / raw)
  To: kernel-janitors

On 08/08/2018 15:29, Dan Carpenter wrote:
> We accidentally return success instead of -ENOMEM on this error path.
>
> Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

thanks

Reviewed-by: John Garry <john.garry@huawei.com>

> ---
> v2: return -ENOMEM instead of -ENODEV
>
> diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
> index 80e5b283fd81..cb8191afc1dc 100644
> --- a/drivers/scsi/aic94xx/aic94xx_init.c
> +++ b/drivers/scsi/aic94xx/aic94xx_init.c
> @@ -1030,8 +1030,10 @@ static int __init aic94xx_init(void)
>
>  	aic94xx_transport_template >  		sas_domain_attach_transport(&aic94xx_transport_functions);
> -	if (!aic94xx_transport_template)
> +	if (!aic94xx_transport_template) {
> +		err = -ENOMEM;
>  		goto out_destroy_caches;
> +	}
>
>  	err = pci_register_driver(&aic94xx_pci_driver);
>  	if (err)
>
> .
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init()
  2018-08-08 14:29 [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init() Dan Carpenter
  2018-08-08 16:07 ` John Garry
@ 2018-08-09  1:18 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-08-09  1:18 UTC (permalink / raw)
  To: kernel-janitors


Dan,

> We accidentally return success instead of -ENOMEM on this error path.

Applied to 4.19/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-09  1:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08 14:29 [PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init() Dan Carpenter
2018-08-08 16:07 ` John Garry
2018-08-09  1:18 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.