From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: airlied@linux.ie, tomi.valkeinen@ti.com,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: omapdrm: hdmi: Use PTR_ERR_OR_ZERO
Date: Thu, 31 Aug 2017 18:01:00 +0300 [thread overview]
Message-ID: <2927000.82bNJ3FzMp@avalon> (raw)
In-Reply-To: <1504015212-17828-1-git-send-email-himanshujha199640@gmail.com>
Hi Himanshu,
Thank you for the patch.
On Tuesday, 29 August 2017 17:00:12 EEST Himanshu Jha wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 5 +----
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 5 +----
> drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 5 +----
> 4 files changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index f169348..3bf81e1 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> @@ -676,10 +676,7 @@ static int hdmi_audio_register(struct device *dev)
> dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
> &pdata, sizeof(pdata));
>
> - if (IS_ERR(hdmi.audio_pdev))
> - return PTR_ERR(hdmi.audio_pdev);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(hdmi.audio_pdev);
> }
>
> /* HDMI HW IP initialisation */
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c index 365cf07..aafd723 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -922,8 +922,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct
> hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c index ab179ec..45c7b0f 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
> @@ -911,8 +911,5 @@ int hdmi5_core_init(struct platform_device *pdev, struct
> hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c index a156292..12a85cb 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
> @@ -194,8 +194,5 @@ int hdmi_phy_init(struct platform_device *pdev, struct
> hdmi_phy_data *phy,
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
> phy->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(phy->base))
> - return PTR_ERR(phy->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(phy->base);
> }
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2017-08-31 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 14:00 [PATCH] drm: omapdrm: hdmi: Use PTR_ERR_OR_ZERO Himanshu Jha
2017-08-31 15:01 ` Laurent Pinchart [this message]
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=2927000.82bNJ3FzMp@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=himanshujha199640@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomi.valkeinen@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.