* Re: Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register
@ 2022-06-01 8:45 Jiasheng Jiang
2022-06-01 9:15 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Jiasheng Jiang @ 2022-06-01 8:45 UTC (permalink / raw)
To: laurent.pinchart
Cc: andrzej.hajda, narmstrong, robert.foss, jonas, jernej.skrabec,
airlied, daniel, maxime, sam, alsi, jagan, biju.das.jz, l.stach,
dri-devel, linux-kernel, Jiasheng Jiang
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register
2022-06-01 8:45 Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register Jiasheng Jiang
@ 2022-06-01 9:15 ` Laurent Pinchart
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2022-06-01 9:15 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: andrzej.hajda, narmstrong, robert.foss, jonas, jernej.skrabec,
airlied, daniel, maxime, sam, alsi, jagan, biju.das.jz, l.stach,
dri-devel, linux-kernel
On Wed, Jun 01, 2022 at 04:45:01PM +0800, Jiasheng Jiang wrote:
> 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().
The issue is that adv7511_exit() is not called if adv7511_init() fails.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register
@ 2022-06-01 11:12 Jiasheng Jiang
0 siblings, 0 replies; 3+ messages in thread
From: Jiasheng Jiang @ 2022-06-01 11:12 UTC (permalink / raw)
To: laurent.pinchart
Cc: andrzej.hajda, narmstrong, robert.foss, jonas, jernej.skrabec,
airlied, daniel, maxime, sam, alsi, jagan, biju.das.jz, l.stach,
dri-devel, linux-kernel, Jiasheng Jiang
On Wed, Jun 01, 2022 at 05:15:37PM +0800, Laurent Pinchart wrote:
>> 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().
>
> The issue is that adv7511_exit() is not called if adv7511_init() fails.
Sorry, I can not find the caller of adv7511_init().
Please give me more detail.
Thanks,
Jiang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-01 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 8:45 Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register Jiasheng Jiang
2022-06-01 9:15 ` Laurent Pinchart
2022-06-01 11:12 Jiasheng Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®