diff options
| author | Dan Carpenter <[email protected]> | 2023-12-06 15:05:15 +0000 |
|---|---|---|
| committer | Robert Foss <[email protected]> | 2023-12-06 15:20:23 +0000 |
| commit | 28d3d0696688154cc04983f343011d07bf0508e4 (patch) | |
| tree | 6ba07c6ee453b2b358c1df57ccc82eda9a21608f /drivers/gpu/drm/drm_framebuffer.c | |
| parent | drm/imagination: move update_logtype() into ifdef section (diff) | |
| download | kernel-28d3d0696688154cc04983f343011d07bf0508e4.tar.gz kernel-28d3d0696688154cc04983f343011d07bf0508e4.zip | |
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 <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
0 files changed, 0 insertions, 0 deletions
