public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: s.nawrocki@samsung•com (Sylwester Nawrocki)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL
Date: Thu, 19 Apr 2012 10:25:36 +0200	[thread overview]
Message-ID: <4F8FCC00.10807@samsung.com> (raw)
In-Reply-To: <4F8F586C.3020401@samsung.com>

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

       reply	other threads:[~2012-04-19  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1334722134-14545-1-git-send-email-jhbird.choi@samsung.com>
     [not found] ` <4F8F586C.3020401@samsung.com>
2012-04-19  8:25   ` Sylwester Nawrocki [this message]
2012-04-19  9:03     ` [PATCH] ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL Russell King - ARM Linux
2012-04-20 10:25       ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F8FCC00.10807@samsung.com \
    --to=s.nawrocki@samsung$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox