Re: [PATCH 1/7] drm/bridge/synopsys: dsi: Remove unnecessary platform_get_resource() error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Fabio,


On 12/18/2017 02:02 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxx>
> 
> devm_ioremap_resource() already checks if the resource is NULL, so
> remove the unnecessary platform_get_resource() error check.
> 
> Cc: Archit Taneja <architt@xxxxxxxxxxxxxx>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx>
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index d9cca4f..5db4cbb 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -860,9 +860,6 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
>   
>   	if (!plat_data->base) {
>   		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -		if (!res)
> -			return ERR_PTR(-ENODEV);
> -

Many thanks for this cleanup.

Reviewed-by: Philippe Cornu <philippe.cornu@xxxxxx>

Philippe :-)

>   		dsi->base = devm_ioremap_resource(dev, res);
>   		if (IS_ERR(dsi->base))
>   			return ERR_PTR(-ENODEV);
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux