The variable err is being assigned -ENODEV and then err is being
re-assigned the same error value via the error exit label err_mfd.
The assignment is redundant and can be removed.
Cleans up clang scan build warning:
drivers/mfd/timberdale.c:768:3: warning: Value stored to 'err' is
never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <[email protected]>
---
drivers/mfd/timberdale.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 07e5aa10a146..a41e9a3e2064 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -765,7 +765,6 @@ static int timb_probe(struct pci_dev *dev,
default:
dev_err(&dev->dev, "Unknown IP setup: %d.%d.%d\n",
priv->fw.major, priv->fw.minor, ip_setup);
- err = -ENODEV;
goto err_mfd;
}
--
2.39.2
On Mon, 15 Apr 2024 11:26:32 +0100, Colin Ian King wrote:
> The variable err is being assigned -ENODEV and then err is being
> re-assigned the same error value via the error exit label err_mfd.
> The assignment is redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/mfd/timberdale.c:768:3: warning: Value stored to 'err' is
> never read [deadcode.DeadStores]
>
> [...]
Applied, thanks!
[1/1] mfd: timberdale: remove redundant assignment to variable err
commit: 3f2706adbc2b8b6aaf313cc66271642d901d90e0
--
Lee Jones [李琼斯]