pinctrl: single: Remove unreachable code
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 7 Aug 2025 10:04:02 +0000 (11:04 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 15 Aug 2025 20:17:30 +0000 (14:17 -0600)
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@linaro.org>
drivers/pinctrl/pinctrl-single.c

index a3802d2..c96b293 100644 (file)
@@ -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)