Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()

2020-05-06 Thread Wei Yongjun



On 2020/5/6 20:57, Dan Carpenter wrote:
> On Wed, May 06, 2020 at 12:52:55PM +, 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 
> 
> 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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()

2020-05-06 Thread Dan Carpenter
On Wed, May 06, 2020 at 12:52:55PM +, 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 

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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()

2020-05-06 Thread Dan Carpenter
On Wed, May 06, 2020 at 12:52:55PM +, 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 
> ---
>  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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()

2020-05-06 Thread Wei Yongjun
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 
---
 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(>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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel