[PATCH] arm: omap2: io: fix clk_get() error check

Kevin Hilman khilman at deeprootsystems.com
Thu Dec 2 05:11:02 EST 2010


Aaro Koskinen <aaro.koskinen at nokia.com> writes:

> clk_get() return value should be checked with IS_ERR().
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen at nokia.com>

Acked-by: Kevin Hilman <khilman at deeprootsystems.com>

> ---
>  arch/arm/mach-omap2/io.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 40562dd..a1939b1 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -297,7 +297,7 @@ static int __init _omap2_init_reprogram_sdrc(void)
>  		return 0;
>  
>  	dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck");
> -	if (!dpll3_m2_ck)
> +	if (IS_ERR(dpll3_m2_ck))
>  		return -EINVAL;
>  
>  	rate = clk_get_rate(dpll3_m2_ck);



More information about the linux-arm-kernel mailing list