lkml.org 
[lkml]   [2015]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mcb: Do not return zero on error path in mcb_pci_probe()
From
On Sat, Oct 17, 2015 at 11:33 PM, Alexey Khoroshilov
<khoroshilov@ispras.ru> wrote:
> There is an error path in mcb_pci_probe() where
> it returns zero instead of error code.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---
> drivers/mcb/mcb-pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c
> index 051645498b53..67d5e7d08df6 100644
> --- a/drivers/mcb/mcb-pci.c
> +++ b/drivers/mcb/mcb-pci.c
> @@ -51,6 +51,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> priv->mapbase = pci_resource_start(pdev, 0);
> if (!priv->mapbase) {
> dev_err(&pdev->dev, "No PCI resource\n");
> + ret = -ENODEV;
> goto out_disable;
> }
>
> --
> 1.9.1
>

Applied, thanks.

@Greg, shall I forward you the patch or do a pull request?


\
 
 \ /
  Last update: 2015-10-22 10:01    [W:0.045 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site