[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a8d9a48-e95d-8607-5181-f264bcabd3c8@codeaurora.org>
Date: Thu, 28 Mar 2019 20:01:45 +0530
From: Mukesh Ojha <mojha@...eaurora.org>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Florian Fainelli <f.fainelli@...il.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] vlynq: Fix uninitialized error code in probe()
On 3/28/2019 7:47 PM, 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@...cle.com>
Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>
-Mukesh
> ---
> 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);
>
Powered by blists - more mailing lists