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 <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
47572b84aa
commit
bd16f9ebd0
@@ -352,7 +352,7 @@ read_rtc:
|
|||||||
/* oscillator fault? clear flag, and warn */
|
/* oscillator fault? clear flag, and warn */
|
||||||
if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) {
|
if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) {
|
||||||
i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL,
|
i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL,
|
||||||
ds1307->regs[DS1337_REG_CONTROL]
|
ds1307->regs[DS1307_REG_CONTROL]
|
||||||
& ~DS1338_BIT_OSF);
|
& ~DS1338_BIT_OSF);
|
||||||
dev_warn(&client->dev, "SET TIME!\n");
|
dev_warn(&client->dev, "SET TIME!\n");
|
||||||
goto read_rtc;
|
goto read_rtc;
|
||||||
|
Reference in New Issue
Block a user