]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ast: Handle failed I2C initialization gracefully
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 6 Dec 2021 09:11:23 +0000 (10:11 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 16 Dec 2021 11:29:22 +0000 (12:29 +0100)
commitf43fbd12b0b28daca8134f1a9626b3a8ab8c353a
tree0229059aff4fcbe2196f73cd9797f01c926b4059
parent7ce8345ccc5b826822d3e6d784426d3b43b23399
drm/ast: Handle failed I2C initialization gracefully

I2C initialization is allowed to fail. In this case, create a connector
without DDC adapter. The current code would dereference a NULL pointer.

Reading the modes from the connector is supposed to work without I2C
adapter. Add the respective test.

v2:
* init edid to NULL to avoid uninitialized read (Dan)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20211206091125.29501-2-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c