]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mgag200: Fail on I2C initialization errors
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 16 May 2022 13:43:38 +0000 (15:43 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 17 May 2022 18:23:28 +0000 (20:23 +0200)
commitc949f8cb83090e3b08375f23766d8e2ab53f6c7d
tree42b7f74d352372702185ffe6756224e802acb353
parentea09093305b25faf484a4e1a90c3b227997cdbc3
drm/mgag200: Fail on I2C initialization errors

Initialization of the I2C adapter was allowed to fail. The mgag200
driver would have continued without DDC support. Had this happened in
practice, it would have led to segmentation faults in the connector
code. Resolve this problem by failing driver initialization on I2C-
related errors.

v2:
* initialize 'ret' before drm_err() (kernel test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-3-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_i2c.c
drivers/gpu/drm/mgag200/mgag200_mode.c