Skip to content

Commit c8fa5b7

Browse files
dianderssuperna9999
authored andcommitted
drm/bridge: ti-sn65dsi86: Check the regmap return value when setting a GPIO
The ti_sn_bridge_gpio_set() got the return value of regmap_update_bits() but didn't check it. The function can't return an error value, but we should at least print a warning if it didn't work. This fixes a compiler warning about setting "ret" but not using it. Fixes: 27ed2b3 ("drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux") Signed-off-by: Douglas Anderson <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.4.Ia4376fd88cdc6e8f8b43c65548458305f82f1d61@changeid
1 parent c42fb72 commit c8fa5b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,9 @@ static void ti_sn_bridge_gpio_set(struct gpio_chip *chip, unsigned int offset,
999999
ret = regmap_update_bits(pdata->regmap, SN_GPIO_IO_REG,
10001000
BIT(SN_GPIO_OUTPUT_SHIFT + offset),
10011001
val << (SN_GPIO_OUTPUT_SHIFT + offset));
1002+
if (ret)
1003+
dev_warn(pdata->dev,
1004+
"Failed to set bridge GPIO %u: %d\n", offset, ret);
10021005
}
10031006

10041007
static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip,

0 commit comments

Comments
 (0)