* [PATCH] rtc: v3020: remove redundant initialization of variable retval
@ 2021-06-09 12:00 Colin King
2021-06-20 20:33 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-06-09 12:00 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, linux-rtc
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable retval is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/rtc/rtc-v3020.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index d2da92187d56..4e8341c49f51 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -282,7 +282,7 @@ static int rtc_probe(struct platform_device *pdev)
{
struct v3020_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct v3020 *chip;
- int retval = -EBUSY;
+ int retval;
int i;
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: v3020: remove redundant initialization of variable retval
2021-06-09 12:00 [PATCH] rtc: v3020: remove redundant initialization of variable retval Colin King
@ 2021-06-20 20:33 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2021-06-20 20:33 UTC (permalink / raw)
To: Colin King, linux-rtc, Alessandro Zummo
Cc: Alexandre Belloni, linux-kernel, kernel-janitors
On Wed, 9 Jun 2021 13:00:50 +0100, Colin King wrote:
> The variable retval is being initialized with a value that is never read,
> it is being updated later on. The assignment is redundant and can be
> removed.
Applied, thanks!
[1/1] rtc: v3020: remove redundant initialization of variable retval
commit: fc3c335226a92f69aa01061e66b60ace88475dd3
Best regards,
--
Alexandre Belloni <alexandre.belloni@bootlin.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-20 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 12:00 [PATCH] rtc: v3020: remove redundant initialization of variable retval Colin King
2021-06-20 20:33 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).