Re: [PATCH] pinctrl: imx: fix allocation result check

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

 



On 21-12-22 22:28:07, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@xxxxxxxxxx>
> 
> Fix code to check correct variable value.
> 
> Reported-by: Abel Vesa <abel.vesa@xxxxxxx>

Reviewed-by: Abel Vesa <abel.vesa@xxxxxxx>

> Fixes: 02f117134952 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const")
> Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
> ---
> Linus: I'm not sure if you can rebase your tree. Treat it as separated
> patch or fixup. Depending on how to manage your repository.
> ---
>  drivers/pinctrl/freescale/pinctrl-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> index 47b2ab1a14d0..16bc1bfc03e4 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> @@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
>  
>  	group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
>  				   sizeof(char *), GFP_KERNEL);
> -	if (!func->group_names)
> +	if (!group_names)
>  		return -ENOMEM;
>  	for_each_child_of_node(np, child)
>  		group_names[i] = child->name;
> -- 
> 2.31.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