diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-max6902.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 3e183cfee10f..1f956dc5d56e 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c | |||
@@ -89,13 +89,9 @@ static int max6902_get_reg(struct device *dev, unsigned char address, | |||
89 | 89 | ||
90 | /* do the i/o */ | 90 | /* do the i/o */ |
91 | status = spi_sync(spi, &message); | 91 | status = spi_sync(spi, &message); |
92 | if (status == 0) | ||
93 | status = message.status; | ||
94 | else | ||
95 | return status; | ||
96 | |||
97 | *data = chip->rx_buf[1]; | ||
98 | 92 | ||
93 | if (status == 0) | ||
94 | *data = chip->rx_buf[1]; | ||
99 | return status; | 95 | return status; |
100 | } | 96 | } |
101 | 97 | ||
@@ -125,9 +121,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt) | |||
125 | 121 | ||
126 | /* do the i/o */ | 122 | /* do the i/o */ |
127 | status = spi_sync(spi, &message); | 123 | status = spi_sync(spi, &message); |
128 | if (status == 0) | 124 | if (status) |
129 | status = message.status; | ||
130 | else | ||
131 | return status; | 125 | return status; |
132 | 126 | ||
133 | /* The chip sends data in this order: | 127 | /* The chip sends data in this order: |