mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] vlynq: Fix uninitialized error code in probe()
@ 2019-03-28 14:17 Dan Carpenter
  2019-03-28 14:31 ` Mukesh Ojha
  2019-03-28 17:01 ` Florian Fainelli
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:17 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-kernel, kernel-janitors

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>
---
 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);
 
-- 
2.17.1


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

end of thread, other threads:[~2019-03-28 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:17 [PATCH] vlynq: Fix uninitialized error code in probe() Dan Carpenter
2019-03-28 14:31 ` Mukesh Ojha
2019-03-28 17:01 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome