From: CK Hu <ck.hu@mediatek.com>
To: Tzung-Bi Shih <tzungbi@google.com>
Cc: alsa-devel@alsa-project.org, p.zabel@pengutronix.de,
airlied@linux.ie, dri-devel@lists.freedesktop.org,
broonie@kernel.org, linux-mediatek@lists.infradead.org,
daniel@ffwll.ch, matthias.bgg@gmail.com, dgreid@google.com,
linux-arm-kernel@lists.infradead.org, cychiang@google.com
Subject: Re: [PATCH v2 1/3] drm/mediatek: exit earlier if failed to register audio driver
Date: Fri, 7 Feb 2020 17:34:17 +0800 [thread overview]
Message-ID: <1581068057.28261.0.camel@mtksdaap41> (raw)
In-Reply-To: <20200206102509.1.Ieba8d422486264eb7aaa3aa257620a1b0c74c6db@changeid>
Hi, Tzung-Bi:
On Thu, 2020-02-06 at 11:17 +0800, Tzung-Bi Shih wrote:
> Exits earlier if register_audio_driver() returns errors.
>
Acked-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index c79b1f855d89..23c2b0e8693d 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1656,7 +1656,7 @@ static const struct hdmi_codec_ops mtk_hdmi_audio_codec_ops = {
> .get_eld = mtk_hdmi_audio_get_eld,
> };
>
> -static void mtk_hdmi_register_audio_driver(struct device *dev)
> +static int mtk_hdmi_register_audio_driver(struct device *dev)
> {
> struct hdmi_codec_pdata codec_data = {
> .ops = &mtk_hdmi_audio_codec_ops,
> @@ -1669,9 +1669,10 @@ static void mtk_hdmi_register_audio_driver(struct device *dev)
> PLATFORM_DEVID_AUTO, &codec_data,
> sizeof(codec_data));
> if (IS_ERR(pdev))
> - return;
> + return PTR_ERR(pdev);
>
> DRM_INFO("%s driver bound to HDMI\n", HDMI_CODEC_DRV_NAME);
> + return 0;
> }
>
> static int mtk_drm_hdmi_probe(struct platform_device *pdev)
> @@ -1705,7 +1706,11 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)
> return ret;
> }
>
> - mtk_hdmi_register_audio_driver(dev);
> + ret = mtk_hdmi_register_audio_driver(dev);
> + if (ret) {
> + dev_err(dev, "Failed to register audio driver: %d\n", ret);
> + return ret;
> + }
>
> hdmi->bridge.funcs = &mtk_hdmi_bridge_funcs;
> hdmi->bridge.of_node = pdev->dev.of_node;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-07 9:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 3:17 [PATCH v2 0/3] ASoC: mediatek: mt8173-rt5650: HDMI jack reporting Tzung-Bi Shih
2020-02-06 3:17 ` [PATCH v2 1/3] drm/mediatek: exit earlier if failed to register audio driver Tzung-Bi Shih
2020-02-07 9:34 ` CK Hu [this message]
2020-02-11 15:48 ` Applied "drm/mediatek: exit earlier if failed to register audio driver" to the asoc tree Mark Brown
2020-02-06 3:17 ` [PATCH v2 2/3] drm/mediatek: support HDMI jack status reporting Tzung-Bi Shih
2020-02-11 15:48 ` Applied "drm/mediatek: support HDMI jack status reporting" to the asoc tree Mark Brown
2020-02-12 8:19 ` [PATCH v2 2/3] drm/mediatek: support HDMI jack status reporting CK Hu
2020-02-12 11:31 ` Tzung-Bi Shih
2020-02-13 1:57 ` CK Hu
2020-02-13 8:02 ` Tzung-Bi Shih
2020-02-06 3:17 ` [PATCH v2 3/3] ASoC: mediatek: mt8173-rt5650: support HDMI jack reporting Tzung-Bi Shih
2020-02-11 15:49 ` Applied "ASoC: mediatek: mt8173-rt5650: support HDMI jack reporting" to the asoc tree Mark Brown
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=1581068057.28261.0.camel@mtksdaap41 \
--to=ck.hu@mediatek.com \
--cc=airlied@linux.ie \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cychiang@google.com \
--cc=daniel@ffwll.ch \
--cc=dgreid@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=tzungbi@google.com \
/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