On Tue, Oct 18, 2022 at 04:25:45PM +0800, Yang Yingliang wrote:
> If mipi_dsi_device_add() fails, the refcount of device is not 0, the name
> allocated in dev_set_name() is leaked. Fix this by calling put_device(),
> so that it will be freed in callback function kobject_cleanup().
> 
> Fixes: 068a00233969 ("drm: Add MIPI DSI bus support")
> Signed-off-by: Yang Yingliang <yangyingli...@huawei.com>
> ---
>  drivers/gpu/drm/drm_mipi_dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Good catch! The device_initialize() function (which is called via
mipi_dsi_device_alloc() earlier in mipi_dsi_device_register_full()) has
a comment that put_device() should be used after it was called.

Reviewed-by: Thierry Reding <tred...@nvidia.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to