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 <[email protected]>
---
 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

Reply via email to