Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Brownell and committed by
Linus Torvalds
bd16f9eb 47572b84

+1 -1
+1 -1
drivers/rtc/rtc-ds1307.c
··· 352 352 /* oscillator fault? clear flag, and warn */ 353 353 if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) { 354 354 i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL, 355 - ds1307->regs[DS1337_REG_CONTROL] 355 + ds1307->regs[DS1307_REG_CONTROL] 356 356 & ~DS1338_BIT_OSF); 357 357 dev_warn(&client->dev, "SET TIME!\n"); 358 358 goto read_rtc;