lkml.org 
[lkml]   [2022]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register
Date
On Wed, Jun 01, 2022 at 02:52:00PM +0800, Laurent Pinchart wrote:
>> static int __init adv7511_init(void)
>> {
>> - if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
>> - mipi_dsi_driver_register(&adv7533_dsi_driver);
>> + int ret;
>> +
>> + if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
>> + ret = mipi_dsi_driver_register(&adv7533_dsi_driver);
>> + if (ret)
>> + return ret;
>> + }
>>
>> return i2c_add_driver(&adv7511_driver);
>
> While at it, should this then call mipi_dsi_driver_unregister() on
> failure ?

Well, as far as I am concerned, the adv7511_exit() in the same file has already dealt with the issue.
Therefore, it might not be necessary to add another mipi_dsi_driver_unregister().

Thanks,
Jiang

\
 
 \ /
  Last update: 2022-06-01 10:47    [W:2.129 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site