From: Dan Carpenter <dan.carpenter@oracle.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] vlynq: Fix uninitialized error code in probe()
Date: Thu, 28 Mar 2019 17:17:42 +0300 [thread overview]
Message-ID: <20190328141742.GM32590@kadam> (raw)
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
next reply other threads:[~2019-03-28 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 14:17 Dan Carpenter [this message]
2019-03-28 14:31 ` Mukesh Ojha
2019-03-28 17:01 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190328141742.GM32590@kadam \
--to=dan.carpenter@oracle.com \
--cc=f.fainelli@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®