All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] s390/ism: fix error return code in ism_probe()
@ 2020-05-07  9:43 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2020-05-07  9:43 UTC (permalink / raw)
  To: Julian Wiedmann, Ursula Braun, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Sebastian Ott
  Cc: Wei Yongjun, linux-s390, kernel-janitors, Hulk Robot

Fix to return negative error code -ENOMEM from the smcd_alloc_dev()
error handling case instead of 0, as done elsewhere in this function.

Fixes: 684b89bc39ce ("s390/ism: add device driver for internal shared memory")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/s390/net/ism_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
index c75112ee7b97..c7fade836d83 100644
--- a/drivers/s390/net/ism_drv.c
+++ b/drivers/s390/net/ism_drv.c
@@ -521,8 +521,10 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
 				   ISM_NR_DMBS);
-	if (!ism->smcd)
+	if (!ism->smcd) {
+		ret = -ENOMEM;
 		goto err_resource;
+	}
 
 	ism->smcd->priv = ism;
 	ret = ism_dev_init(ism);

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

* [PATCH -next] s390/ism: fix error return code in ism_probe()
@ 2020-05-07  9:43 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2020-05-07  9:43 UTC (permalink / raw)
  To: Julian Wiedmann, Ursula Braun, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Sebastian Ott
  Cc: Wei Yongjun, linux-s390, kernel-janitors, Hulk Robot

Fix to return negative error code -ENOMEM from the smcd_alloc_dev()
error handling case instead of 0, as done elsewhere in this function.

Fixes: 684b89bc39ce ("s390/ism: add device driver for internal shared memory")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/s390/net/ism_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
index c75112ee7b97..c7fade836d83 100644
--- a/drivers/s390/net/ism_drv.c
+++ b/drivers/s390/net/ism_drv.c
@@ -521,8 +521,10 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
 				   ISM_NR_DMBS);
-	if (!ism->smcd)
+	if (!ism->smcd) {
+		ret = -ENOMEM;
 		goto err_resource;
+	}
 
 	ism->smcd->priv = ism;
 	ret = ism_dev_init(ism);

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

* Re: [PATCH -next] s390/ism: fix error return code in ism_probe()
  2020-05-07  9:43 ` Wei Yongjun
@ 2020-05-07 12:33   ` Ursula Braun
  -1 siblings, 0 replies; 4+ messages in thread
From: Ursula Braun @ 2020-05-07 12:33 UTC (permalink / raw)
  To: Wei Yongjun, Julian Wiedmann, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Sebastian Ott
  Cc: linux-s390, kernel-janitors, Hulk Robot



On 5/7/20 11:43 AM, Wei Yongjun wrote:
> Fix to return negative error code -ENOMEM from the smcd_alloc_dev()
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 684b89bc39ce ("s390/ism: add device driver for internal shared memory")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thanks Wei Yongjun - your patch is fine. It will be part of our next patch submission.

Regards, Ursula

> ---
>  drivers/s390/net/ism_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
> index c75112ee7b97..c7fade836d83 100644
> --- a/drivers/s390/net/ism_drv.c
> +++ b/drivers/s390/net/ism_drv.c
> @@ -521,8 +521,10 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
>  				   ISM_NR_DMBS);
> -	if (!ism->smcd)
> +	if (!ism->smcd) {
> +		ret = -ENOMEM;
>  		goto err_resource;
> +	}
>  
>  	ism->smcd->priv = ism;
>  	ret = ism_dev_init(ism);
> 
> 
> 

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

* Re: [PATCH -next] s390/ism: fix error return code in ism_probe()
@ 2020-05-07 12:33   ` Ursula Braun
  0 siblings, 0 replies; 4+ messages in thread
From: Ursula Braun @ 2020-05-07 12:33 UTC (permalink / raw)
  To: Wei Yongjun, Julian Wiedmann, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Sebastian Ott
  Cc: linux-s390, kernel-janitors, Hulk Robot



On 5/7/20 11:43 AM, Wei Yongjun wrote:
> Fix to return negative error code -ENOMEM from the smcd_alloc_dev()
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 684b89bc39ce ("s390/ism: add device driver for internal shared memory")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thanks Wei Yongjun - your patch is fine. It will be part of our next patch submission.

Regards, Ursula

> ---
>  drivers/s390/net/ism_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
> index c75112ee7b97..c7fade836d83 100644
> --- a/drivers/s390/net/ism_drv.c
> +++ b/drivers/s390/net/ism_drv.c
> @@ -521,8 +521,10 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
>  				   ISM_NR_DMBS);
> -	if (!ism->smcd)
> +	if (!ism->smcd) {
> +		ret = -ENOMEM;
>  		goto err_resource;
> +	}
>  
>  	ism->smcd->priv = ism;
>  	ret = ism_dev_init(ism);
> 
> 
> 

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

end of thread, other threads:[~2020-05-07 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  9:43 [PATCH -next] s390/ism: fix error return code in ism_probe() Wei Yongjun
2020-05-07  9:43 ` Wei Yongjun
2020-05-07 12:33 ` Ursula Braun
2020-05-07 12:33   ` Ursula Braun

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.