From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com,
robert.foss@linaro.org, jonas@kwiboo.se,
jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
maxime@cerno.tech, sam@ravnborg.org, alsi@bang-olufsen.dk,
jagan@amarulasolutions.com, biju.das.jz@bp.renesas.com,
l.stach@pengutronix.de, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register
Date: Wed, 1 Jun 2022 12:15:37 +0300 [thread overview]
Message-ID: <YpcuOfeil7ZpE2gH@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220601084501.2900380-1-jiasheng@iscas.ac.cn>
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
next prev parent reply other threads:[~2022-06-01 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 8:45 Jiasheng Jiang
2022-06-01 9:15 ` Laurent Pinchart [this message]
2022-06-01 11:12 Jiasheng Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YpcuOfeil7ZpE2gH@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=alsi@bang-olufsen.dk \
--cc=andrzej.hajda@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jiasheng@iscas.ac.cn \
--cc=jonas@kwiboo.se \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=narmstrong@baylibre.com \
--cc=robert.foss@linaro.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®