diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2024-02-23 16:28:50 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-02-29 14:38:09 +0100 |
commit | 170c96246f0c5eefee9b14b105caaafef7d4cf57 (patch) | |
tree | 98b836eabc92c04b5aea7e74507fe407a222f418 /drivers/pinctrl | |
parent | 2805464831dd4c5c285c6e6ef42f2697c80e2fd6 (diff) |
pinctrl: ocelot: remove redundant assignment to variable ret
The variable ret is being assigned a value that is never read, it
is being re-assigned a value in every case statement in the following
switch statement. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
drivers/pinctrl/pinctrl-ocelot.c:1404:3: warning: Value stored to 'ret'
is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240223162850.3914349-1-colin.i.king@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-ocelot.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 52aadd6d72a8..be9b8c010167 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1401,7 +1401,6 @@ static int ocelot_hw_set_value(struct ocelot_pinctrl *info, if (info->pincfg) { const struct ocelot_pincfg_data *opd = info->pincfg_data; - ret = 0; switch (reg) { case PINCONF_BIAS: ret = ocelot_pincfg_clrsetbits(info, pin, |