lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] vlynq: Fix uninitialized error code in probe()
From
Date
On 3/28/19 7:17 AM, Dan Carpenter wrote:
> The "result" variable isn't initialized on this error path.
>
> Fixes: 55e331cf7ebe ("drivers: add support for the TI VLYNQ bus")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Andrew can you pick this up the same you have you done that before?

> ---
> drivers/vlynq/vlynq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
> index c0227f9418eb..44d3485d1108 100644
> --- a/drivers/vlynq/vlynq.c
> +++ b/drivers/vlynq/vlynq.c
> @@ -727,7 +727,8 @@ static int vlynq_probe(struct platform_device *pdev)
> dev->local_irq = dev->irq_end - dev->irq_start;
> dev->remote_irq = dev->local_irq - 1;
>
> - if (device_register(&dev->dev))
> + result = device_register(&dev->dev);
> + if (result)
> goto fail_register;
> platform_set_drvdata(pdev, dev);
>
>


--
Florian

\
 
 \ /
  Last update: 2019-03-28 18:02    [W:0.053 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site