Re: [PATCH] ASoC: tegra: Fix a NULL vs IS_ERR() check

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

 



18.06.2021 16:44, Dan Carpenter пишет:
> The tegra_machine_parse_phandle() function doesn't return NULL, it returns
> error pointers.
> 
> Fixes: cc8f70f56039 ("ASoC: tegra: Unify ASoC machine drivers")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  sound/soc/tegra/tegra_asoc_machine.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
> index a53aec361a77..735909310a26 100644
> --- a/sound/soc/tegra/tegra_asoc_machine.c
> +++ b/sound/soc/tegra/tegra_asoc_machine.c
> @@ -409,7 +409,7 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
>  		return PTR_ERR(np_codec);
>  
>  	np_i2s = tegra_machine_parse_phandle(dev, "nvidia,i2s-controller");
> -	if (!np_i2s)
> +	if (IS_ERR(np_i2s))
>  		return PTR_ERR(np_i2s);
>  
>  	card->dai_link->cpus->of_node = np_i2s;
> 

Reviewed-by: Dmitry Osipenko <digetx@xxxxxxxxx>



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux