lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2927000.82bNJ3FzMp@avalon>
Date:   Thu, 31 Aug 2017 18:01:00 +0300
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Himanshu Jha <himanshujha199640@...il.com>
Cc:     airlied@...ux.ie, tomi.valkeinen@...com,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: omapdrm: hdmi: Use PTR_ERR_OR_ZERO

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@...il.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ