Skip to contentSkip to conversation

rtc: rtc-nuc900: use NULL instead of 0

PATCH New Jingoo Han 1 participant 1 message Aug 19, 2013 Real time clock (RTC)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 rtc: rtc-nuc900: use NULL instead of 0

check_rtc_access_enable() returns pointer, thus NULL should be used instead of 0 in order to fix the following sparse warning:

drivers/rtc/rtc-nuc900.c:102:16: warning: Using plain integer as NULL pointer

---
 drivers/rtc/rtc-nuc900.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-nuc900.c +1 -1
index 22861c5..248653c 100644
@@ -99,7 +99,7 @@ static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
 	if (!timeout)
 		return ERR_PTR(-EPERM);
 
-	return 0;
+	return NULL;
 }
 
 static int nuc900_rtc_bcd2bin(unsigned int timereg,
Signature · 1 line
1.7.10.4