diff options
author | Douglas Anderson <dianders@chromium.org> | 2020-06-12 22:30:50 +0300 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2020-06-18 12:40:38 +0300 |
commit | c8fa5b7c7a7e54ec64edc3904ee794b5ccf12b8b (patch) | |
tree | dee4f733da77a15a1c101716a1e1186d63cdef8f | |
parent | c42fb724cdf608ef7234da7281d66de2eb102a73 (diff) | |
download | linux-c8fa5b7c7a7e54ec64edc3904ee794b5ccf12b8b.tar.xz |
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: 27ed2b3f22ed ("drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.4.Ia4376fd88cdc6e8f8b43c65548458305f82f1d61@changeid
-rw-r--r-- | drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 1080e4f9df96..bd3eb0a09732 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -999,6 +999,9 @@ static void ti_sn_bridge_gpio_set(struct gpio_chip *chip, unsigned int offset, ret = regmap_update_bits(pdata->regmap, SN_GPIO_IO_REG, BIT(SN_GPIO_OUTPUT_SHIFT + offset), val << (SN_GPIO_OUTPUT_SHIFT + offset)); + if (ret) + dev_warn(pdata->dev, + "Failed to set bridge GPIO %u: %d\n", offset, ret); } static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip, |