浏览代码

drm/i2c: tda998x: unregister the connector in the unbind function

tda998x uses drm_connector_register() in the .bind function that
needs to be balanced with a drm_connector_unregister() in the .unbind.
Otherwise dangling sysfs entries are left behind and future rebinds
will fail.

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Liviu Dudau (ARM) 9 年之前
父节点
当前提交
debd15ced9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/gpu/drm/i2c/tda998x_drv.c

+ 1 - 0
drivers/gpu/drm/i2c/tda998x_drv.c

@@ -1472,6 +1472,7 @@ static void tda998x_unbind(struct device *dev, struct device *master,
 {
 	struct tda998x_priv *priv = dev_get_drvdata(dev);
 
+	drm_connector_unregister(&priv->connector);
 	drm_connector_cleanup(&priv->connector);
 	drm_encoder_cleanup(&priv->encoder);
 	tda998x_destroy(priv);