mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
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: 2066facca4
("drm/kms: slave encoder interface.")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
b3a9e3b962
commit
f78d4032de
@ -84,7 +84,7 @@ int drm_i2c_encoder_init(struct drm_device *dev,
|
||||
|
||||
err = encoder_drv->encoder_init(client, dev, encoder);
|
||||
if (err)
|
||||
goto fail_unregister;
|
||||
goto fail_module_put;
|
||||
|
||||
if (info->platform_data)
|
||||
encoder->slave_funcs->set_config(&encoder->base,
|
||||
@ -92,9 +92,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,
|
||||
|
||||
return 0;
|
||||
|
||||
fail_module_put:
|
||||
module_put(module);
|
||||
fail_unregister:
|
||||
i2c_unregister_device(client);
|
||||
module_put(module);
|
||||
fail:
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user