Commit 170c9624 authored by Colin Ian King's avatar Colin Ian King Committed by Linus Walleij

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: default avatarColin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240223162850.3914349-1-colin.i.king@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 28054648
...@@ -1401,7 +1401,6 @@ static int ocelot_hw_set_value(struct ocelot_pinctrl *info, ...@@ -1401,7 +1401,6 @@ static int ocelot_hw_set_value(struct ocelot_pinctrl *info,
if (info->pincfg) { if (info->pincfg) {
const struct ocelot_pincfg_data *opd = info->pincfg_data; const struct ocelot_pincfg_data *opd = info->pincfg_data;
ret = 0;
switch (reg) { switch (reg) {
case PINCONF_BIAS: case PINCONF_BIAS:
ret = ocelot_pincfg_clrsetbits(info, pin, ret = ocelot_pincfg_clrsetbits(info, pin,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment