RE: [PATCH] Revert "pinctrl: freescale: imx: Use 'devm_of_iomap()' to avoid a resource leak in case of error in 'imx_pinctrl_probe()'"

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

 



+ christophe.jaillet@xxxxxxxxxx

> -----Original Message-----
> From: haibo.chen@xxxxxxx [mailto:haibo.chen@xxxxxxx]
> Sent: 2020年6月8日 18:00
> To: Aisheng Dong <aisheng.dong@xxxxxxx>; festevam@xxxxxxxxx;
> shawnguo@xxxxxxxxxx; stefan@xxxxxxxx; kernel@xxxxxxxxxxxxxx;
> linus.walleij@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>
> Cc: linux-gpio@xxxxxxxxxxxxxxx; BOUGH CHEN <haibo.chen@xxxxxxx>
> Subject: [PATCH] Revert "pinctrl: freescale: imx: Use 'devm_of_iomap()' to
> avoid a resource leak in case of error in 'imx_pinctrl_probe()'"
> 
> From: Haibo Chen <haibo.chen@xxxxxxx>
> 
> This patch block system booting, find on imx7d-sdb board.
> From the dts we can see, iomux and iomux_lpsr share the memory region
> [0x30330000-0x3033ffff], so will trigger the following issue:
> 
> [    0.179561] imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl
> driver
> [    0.191742] imx7d-pinctrl 30330000.pinctrl: can't request region for
> resource [mem 0x30330000-0x3033ffff]
> [    0.191842] imx7d-pinctrl: probe of 30330000.pinctrl failed with error -16
> 
> This reverts commit ba403242615c2c99e27af7984b1650771a2cc2c9.
> ---
>  drivers/pinctrl/freescale/pinctrl-imx.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c
> b/drivers/pinctrl/freescale/pinctrl-imx.c
> index cb7e0f08d2cf..1f81569c7ae3 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -824,13 +824,12 @@ int imx_pinctrl_probe(struct platform_device *pdev,
>  				return -EINVAL;
>  			}
> 
> -			ipctl->input_sel_base = devm_of_iomap(&pdev->dev, np,
> -							      0, NULL);
> +			ipctl->input_sel_base = of_iomap(np, 0);
>  			of_node_put(np);
> -			if (IS_ERR(ipctl->input_sel_base)) {
> +			if (!ipctl->input_sel_base) {
>  				dev_err(&pdev->dev,
>  					"iomuxc input select base address not found\n");
> -				return PTR_ERR(ipctl->input_sel_base);
> +				return -ENOMEM;
>  			}
>  		}
>  	}
> --
> 2.17.1





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux