提交 fc3c3352 编写于 作者: C Colin Ian King 提交者: Alexandre Belloni

rtc: v3020: remove redundant initialization of variable retval

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: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210609120050.185746-1-colin.king@canonical.com
上级 950ac33d
...@@ -282,7 +282,7 @@ static int rtc_probe(struct platform_device *pdev) ...@@ -282,7 +282,7 @@ static int rtc_probe(struct platform_device *pdev)
{ {
struct v3020_platform_data *pdata = dev_get_platdata(&pdev->dev); struct v3020_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct v3020 *chip; struct v3020 *chip;
int retval = -EBUSY; int retval;
int i; int i;
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册