Skip to content

Commit

Permalink
drm/connector: Set DDC pointer in drmm_connector_init
Browse files Browse the repository at this point in the history
Commit 35a3b82 ("drm/connector: Introduce drmm_connector_init")
introduced the function drmm_connector_init() with a parameter for an
optional ddc pointer to the i2c controller used to access the DDC bus.

However, the underlying call to __drm_connector_init() was always
setting it to NULL instead of passing the ddc argument around.

This resulted in unexpected null pointer dereference on platforms
expecting to get a DDC controller.

Fixes: 35a3b82 ("drm/connector: Introduce drmm_connector_init")
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20221019143442.1798964-1-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
  • Loading branch information
mripard committed Oct 20, 2022
1 parent 7089003 commit a91e5e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ int drmm_connector_init(struct drm_device *dev,
if (drm_WARN_ON(dev, funcs && funcs->destroy))
return -EINVAL;

ret = __drm_connector_init(dev, connector, funcs, connector_type, NULL);
ret = __drm_connector_init(dev, connector, funcs, connector_type, ddc);
if (ret)
return ret;

Expand Down

0 comments on commit a91e5e3

Please sign in to comment.