All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:52 ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 12:52 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: Wei Yongjun, devel, linux-kernel, kernel-janitors

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..14e07742dc9d 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
 			 pcard->name, pcard);
-	if (rv) {
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}




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

* [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:52 ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 12:52 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: devel, kernel-janitors, Wei Yongjun, linux-kernel

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..14e07742dc9d 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
 			 pcard->name, pcard);
-	if (rv) {
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}

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

* [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:52 ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 12:52 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: devel, kernel-janitors, Wei Yongjun, linux-kernel

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..14e07742dc9d 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
 			 pcard->name, pcard);
-	if (rv) {
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}



_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
  2020-05-06 12:52 ` Wei Yongjun
  (?)
@ 2020-05-06 12:53   ` Dan Carpenter
  -1 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: gregkh, simon, jeremy, devel, linux-kernel, kernel-janitors

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
> index 7b00d7069e21..14e07742dc9d 100644
> --- a/drivers/staging/kpc2000/kpc2000/core.c
> +++ b/drivers/staging/kpc2000/kpc2000/core.c
> @@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  {
>  	int err = 0;
>  	struct kp2000_device *pcard;
> -	int rv;
>  	unsigned long reg_bar_phys_addr;
>  	unsigned long reg_bar_phys_len;
>  	unsigned long dma_bar_phys_addr;
> @@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  	if (err < 0)
>  		goto err_release_dma;
>  
> -	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
> +	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
>  			 pcard->name, pcard);
                        ^
Could you add a space character here so the white space still aligns?

Otherwise it looks good.  :)

regards,
dan carpenter


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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:53   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
> index 7b00d7069e21..14e07742dc9d 100644
> --- a/drivers/staging/kpc2000/kpc2000/core.c
> +++ b/drivers/staging/kpc2000/kpc2000/core.c
> @@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  {
>  	int err = 0;
>  	struct kp2000_device *pcard;
> -	int rv;
>  	unsigned long reg_bar_phys_addr;
>  	unsigned long reg_bar_phys_len;
>  	unsigned long dma_bar_phys_addr;
> @@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  	if (err < 0)
>  		goto err_release_dma;
>  
> -	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
> +	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
>  			 pcard->name, pcard);
                        ^
Could you add a space character here so the white space still aligns?

Otherwise it looks good.  :)

regards,
dan carpenter

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:53   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
> index 7b00d7069e21..14e07742dc9d 100644
> --- a/drivers/staging/kpc2000/kpc2000/core.c
> +++ b/drivers/staging/kpc2000/kpc2000/core.c
> @@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  {
>  	int err = 0;
>  	struct kp2000_device *pcard;
> -	int rv;
>  	unsigned long reg_bar_phys_addr;
>  	unsigned long reg_bar_phys_len;
>  	unsigned long dma_bar_phys_addr;
> @@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
>  	if (err < 0)
>  		goto err_release_dma;
>  
> -	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
> +	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
>  			 pcard->name, pcard);
                        ^
Could you add a space character here so the white space still aligns?

Otherwise it looks good.  :)

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
  2020-05-06 12:52 ` Wei Yongjun
  (?)
@ 2020-05-06 12:57   ` Dan Carpenter
  -1 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:57 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: gregkh, simon, jeremy, devel, linux-kernel, kernel-janitors

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Also could you add a Fixes tag?  This goes all the way back to the
original commit:

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")

regards,
dan carpenter


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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:57   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:57 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Also could you add a Fixes tag?  This goes all the way back to the
original commit:

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")

regards,
dan carpenter

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 12:57   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 12:57 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Also could you add a Fixes tag?  This goes all the way back to the
original commit:

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
  2020-05-06 12:57   ` Dan Carpenter
  (?)
@ 2020-05-06 13:08     ` Wei Yongjun
  -1 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, simon, jeremy, devel, linux-kernel, kernel-janitors



On 2020/5/6 20:57, Dan Carpenter wrote:
> On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function. Also
>> removed var 'rv' since we can use 'err' instead.
>>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Also could you add a Fixes tag?  This goes all the way back to the
> original commit:
> 
> Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
> 

Will fix both of your comments in next version, thanks.

Regards,
Wei Yongjun

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 13:08     ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon



On 2020/5/6 20:57, Dan Carpenter wrote:
> On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function. Also
>> removed var 'rv' since we can use 'err' instead.
>>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Also could you add a Fixes tag?  This goes all the way back to the
> original commit:
> 
> Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
> 

Will fix both of your comments in next version, thanks.

Regards,
Wei Yongjun

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

* Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 13:08     ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon



On 2020/5/6 20:57, Dan Carpenter wrote:
> On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function. Also
>> removed var 'rv' since we can use 'err' instead.
>>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Also could you add a Fixes tag?  This goes all the way back to the
> original commit:
> 
> Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
> 

Will fix both of your comments in next version, thanks.

Regards,
Wei Yongjun
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
  2020-05-06 12:52 ` Wei Yongjun
  (?)
@ 2020-05-06 13:47   ` Wei Yongjun
  -1 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:47 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: Wei Yongjun, devel, linux-kernel, kernel-janitors

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: fix code aligns and add fixes
---
 drivers/staging/kpc2000/kpc2000/core.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..358d7b2f4ad1 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
-			 pcard->name, pcard);
-	if (rv) {
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+			  pcard->name, pcard);
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}




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

* [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 13:47   ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:47 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: devel, kernel-janitors, Wei Yongjun, linux-kernel

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: fix code aligns and add fixes
---
 drivers/staging/kpc2000/kpc2000/core.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..358d7b2f4ad1 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
-			 pcard->name, pcard);
-	if (rv) {
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+			  pcard->name, pcard);
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}

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

* [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 13:47   ` Wei Yongjun
  0 siblings, 0 replies; 18+ messages in thread
From: Wei Yongjun @ 2020-05-06 13:47 UTC (permalink / raw)
  To: gregkh, simon, jeremy, dan.carpenter
  Cc: devel, kernel-janitors, Wei Yongjun, linux-kernel

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.

Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: fix code aligns and add fixes
---
 drivers/staging/kpc2000/kpc2000/core.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7b00d7069e21..358d7b2f4ad1 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 {
 	int err = 0;
 	struct kp2000_device *pcard;
-	int rv;
 	unsigned long reg_bar_phys_addr;
 	unsigned long reg_bar_phys_len;
 	unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto err_release_dma;
 
-	rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
-			 pcard->name, pcard);
-	if (rv) {
+	err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
+			  pcard->name, pcard);
+	if (err) {
 		dev_err(&pcard->pdev->dev,
-			"%s: failed to request_irq: %d\n", __func__, rv);
+			"%s: failed to request_irq: %d\n", __func__, err);
 		goto err_disable_msi;
 	}



_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
  2020-05-06 13:47   ` Wei Yongjun
  (?)
@ 2020-05-06 14:18     ` Dan Carpenter
  -1 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 14:18 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: gregkh, simon, jeremy, devel, linux-kernel, kernel-janitors

Fantastic.  Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


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

* Re: [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 14:18     ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 14:18 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

Fantastic.  Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter

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

* Re: [PATCH -next v2] staging: kpc2000: fix error return code in kp2000_pcie_probe()
@ 2020-05-06 14:18     ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2020-05-06 14:18 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: devel, gregkh, kernel-janitors, linux-kernel, simon

Fantastic.  Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-05-06 14:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 12:52 [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe() Wei Yongjun
2020-05-06 12:52 ` Wei Yongjun
2020-05-06 12:52 ` Wei Yongjun
2020-05-06 12:53 ` Dan Carpenter
2020-05-06 12:53   ` Dan Carpenter
2020-05-06 12:53   ` Dan Carpenter
2020-05-06 12:57 ` Dan Carpenter
2020-05-06 12:57   ` Dan Carpenter
2020-05-06 12:57   ` Dan Carpenter
2020-05-06 13:08   ` Wei Yongjun
2020-05-06 13:08     ` Wei Yongjun
2020-05-06 13:08     ` Wei Yongjun
2020-05-06 13:47 ` [PATCH -next v2] " Wei Yongjun
2020-05-06 13:47   ` Wei Yongjun
2020-05-06 13:47   ` Wei Yongjun
2020-05-06 14:18   ` Dan Carpenter
2020-05-06 14:18     ` Dan Carpenter
2020-05-06 14:18     ` Dan Carpenter

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.