From: David Brownell Date: Thu, 26 Jul 2007 17:41:00 +0000 (-0700) Subject: rtc-ds1307: typo fix found by coverity X-Git-Tag: v2.6.23-rc2~226 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd16f9ebd083b965dcdfb6b762e206374d5b823b;p=linux-2.6 rtc-ds1307: typo fix found by coverity Fix a typo turned up by a Coverity check: referring to the wrong register, which could cause problems with DS1338 RTCs whose oscillators halted. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 5158a62567..db6f3f0d89 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -352,7 +352,7 @@ read_rtc: /* oscillator fault? clear flag, and warn */ if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) { i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL, - ds1307->regs[DS1337_REG_CONTROL] + ds1307->regs[DS1307_REG_CONTROL] & ~DS1338_BIT_OSF); dev_warn(&client->dev, "SET TIME!\n"); goto read_rtc;