From 9e444234b6d8de48e9032f47997773cd98d863a5 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 10 Jun 2020 13:36:38 +0100 Subject: hwmon: (i5k_amb) remove redundant assignment to variable res The variable res is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200610123638.1133428-1-colin.king@canonical.com Signed-off-by: Guenter Roeck --- drivers/hwmon/i5k_amb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hwmon/i5k_amb.c') diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index eeac4b04df27..cd5b62905eee 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -396,7 +396,7 @@ exit_remove: static int i5k_amb_add(void) { - int res = -ENODEV; + int res; /* only ever going to be one of these */ amb_pdev = platform_device_alloc(DRVNAME, 0); -- cgit v1.2.3