in response to these warnings posted by dan.carpenter@oracle.com:
New smatch warnings:
drivers/rtc/rtc-rx4581.c:134 rx4581_get_datetime() warn: unsigned 'err' is never less than zero.
Old smatch warnings:
drivers/rtc/rtc-rx4581.c:175 rx4581_get_datetime() warn: unsigned 'err' is never less than zero.
Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
{
struct spi_device *spi = to_spi_device(dev);
unsigned char date[7];
- unsigned char data, err;
+ unsigned char data;
+ int err;
/* First we ensure that the "update flag" is not set, we read the
* time and date then re-read the "update flag". If the update flag