[PATCH 1/4] pinctrl: single: Remove unreachable code
Andrew Goodbody
andrew.goodbody at linaro.org
Thu Aug 7 12:04:02 CEST 2025
In single_read there is a switch block with a default label. All cases
in the switch block, including the default, return directly. So any code
following the switch block is unreachable. Remove the unreachable code.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
drivers/pinctrl/pinctrl-single.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index a3802d22d4f..c96b293aadf 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -109,8 +109,6 @@ static unsigned int single_read(struct udevice *dev, void *reg)
default: /* 32 bits */
return readl(reg);
}
-
- return readb(reg);
}
static void single_write(struct udevice *dev, unsigned int val, void *reg)
--
2.39.5
More information about the U-Boot
mailing list