Re: [PATCH] ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL

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

 



On 04/19/2012 02:12 AM, Kukjin Kim wrote:
>> --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
>> +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h
>> @@ -25,7 +25,7 @@ static inline void arch_wdt_reset(void)
>>
>>   	__raw_writel(0, S3C2410_WTCON);	  /* disable watchdog, to be safe  */
>>
>> -	if (s3c2410_wdtclk)
>> +	if (!IS_ERR(s3c2410_wdtclk))
> 
> Yeah, right. BTW don't we need to check NULL here?

It might make sense to check for NULL as well, but only if it happens
that a clock entry is ever added to clkdev with null struct clk_lookup:clk
member. This in turn seems impossible with the current clock code at
plat-samsung/clock.c.

>>   		clk_enable(s3c2410_wdtclk);
>>
>>   	/* put initial values into count and data */

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux