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)
commit55dc449a7c60d3df5a8f0b71bbae9d5173c864f5
tree0229059aff4fcbe2196f73cd9797f01c926b4059
parentd619f38c015fd7cf79af5cd34265d5b9247a00f0
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