aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-12-06 18:05:15 +0300
committerRobert Foss <rfoss@kernel.org>2023-12-06 16:20:23 +0100
commit28d3d0696688154cc04983f343011d07bf0508e4 (patch)
tree6ba07c6ee453b2b358c1df57ccc82eda9a21608f /scripts/gcc-plugins
parent4b83b783ad778f7e69312fa61d1bee8e76e2156f (diff)
drm/bridge: nxp-ptn3460: simplify some error checking
The i2c_master_send/recv() functions return negative error codes or they return "len" on success. So the error handling here can be written as just normal checks for "if (ret < 0) return ret;". No need to complicate things. Btw, in this code the "len" parameter can never be zero, but even if it were, then I feel like this would still be the best way to write it. Fixes: 914437992876 ("drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking") Suggested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Robert Foss <rfoss@kernel.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/04242630-42d8-4920-8c67-24ac9db6b3c9@moroto.mountain
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions