提交 f78d4032 编写于 作者: W Wolfram Sang 提交者: Wolfram Sang

drm: encoder_slave: fix refcouting error for modules

module_put() balances try_module_get(), not request_module(). Fix the
error path to match that.

Fixes: 2066facc ("drm/kms: slave encoder interface.")
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: NEmil Velikov <emil.l.velikov@gmail.com>
Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
上级 b3a9e3b9
无相关合并请求
...@@ -84,7 +84,7 @@ int drm_i2c_encoder_init(struct drm_device *dev, ...@@ -84,7 +84,7 @@ int drm_i2c_encoder_init(struct drm_device *dev,
err = encoder_drv->encoder_init(client, dev, encoder); err = encoder_drv->encoder_init(client, dev, encoder);
if (err) if (err)
goto fail_unregister; goto fail_module_put;
if (info->platform_data) if (info->platform_data)
encoder->slave_funcs->set_config(&encoder->base, encoder->slave_funcs->set_config(&encoder->base,
...@@ -92,9 +92,10 @@ int drm_i2c_encoder_init(struct drm_device *dev, ...@@ -92,9 +92,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,
return 0; return 0;
fail_module_put:
module_put(module);
fail_unregister: fail_unregister:
i2c_unregister_device(client); i2c_unregister_device(client);
module_put(module);
fail: fail:
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部