Commit 8bb7e5b9 authored by Wolfram Sang's avatar Wolfram Sang Committed by Kelsey Skunberg

drm: encoder_slave: fix refcouting error for modules

BugLink: https://bugs.launchpad.net/bugs/1885932

[ Upstream commit f78d4032 ]

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 4b306097
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment