Skip to contentSkip to conversation

drivers/rtc/rtc-pcf8563.c: fix warning

PATCH New [email protected] 1 participant 1 message Sep 19, 2014 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/rtc/rtc-pcf8563.c: fix warning

From: Dinh Nguyen <[email protected]>

drivers/rtc/rtc-pcf8563.c: In function pfc8563_irq:
drivers/rtc/rtc-pcf8563.c:173:5: warning: pending may be used uninitialized in this function [-Wmaybe-uninitialized]

---
 drivers/rtc/rtc-pcf8563.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pcf8563.c +1 -1
index 5a197d9..29ba5e7 100644
@@ -164,7 +164,7 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
 {
 	struct pcf8563 *pcf8563 = i2c_get_clientdata(dev_id);
 	int err;
-	char pending;
+	char pending = 0;
 
 	err = pcf8563_get_alarm_mode(pcf8563->client, NULL, &pending);
 	if (err < 0)
Signature · 1 line
2.0.3