]> git.baikalelectronics.ru Git - kernel.git/commit
drm: bridge: adv7511: Add check for mipi_dsi_driver_register
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 2 Jun 2022 10:34:01 +0000 (18:34 +0800)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 24 Jun 2022 20:32:02 +0000 (22:32 +0200)
commit6f47cdf6d7711f0d1ba0f24330d6f9159d54a6aa
tree5a218b75bf2ab3a0338ac053db0f3817b940b7ed
parent2c0545c99cedf1a762cb31e877a283a08d5ca87c
drm: bridge: adv7511: Add check for mipi_dsi_driver_register

As mipi_dsi_driver_register could return error if fails,
it should be better to check the return value and return error
if fails.
Moreover, if i2c_add_driver fails,  mipi_dsi_driver_register
should be reverted.

Fixes: c61e69ce1e56 ("drm/bridge: adv7533: Create a MIPI DSI device")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220602103401.2980938-1-jiasheng@iscas.ac.cn
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c