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)
commitd50f74790bbba662d1438dbc03be6616c52c0722
tree42b7f74d352372702185ffe6756224e802acb353
parent5913ab941d6ea782e841234c76958c6872ea752d
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