lkml.org 
[lkml]   [2021]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rtc: v3020: remove redundant initialization of variable retval
Date
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
\
 
 \ /
  Last update: 2021-06-09 14:01    [W:0.031 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site