Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd16f9eb authored by David Brownell's avatar David Brownell Committed by Linus Torvalds
Browse files

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 47572b84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static int __devinit ds1307_probe(struct i2c_client *client)
		/* 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;