diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2014-12-09 21:54:25 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-10 11:50:33 +1100 |
commit | ca31c21aeb66c30325f927f78b294e967a60e9ac (patch) | |
tree | 4766bc52f85fcac126cd1a2f8ecb16797c6ca97d | |
parent | 345efe1bda8377b42ac9403cbacf7f9610bdd372 (diff) | |
download | skiboot-ca31c21aeb66c30325f927f78b294e967a60e9ac.zip skiboot-ca31c21aeb66c30325f927f78b294e967a60e9ac.tar.gz skiboot-ca31c21aeb66c30325f927f78b294e967a60e9ac.tar.bz2 |
RTC: Fix unused result warnings in RTC driver
Fix Wunused-result
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/fsp/fsp-rtc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/fsp/fsp-rtc.c b/hw/fsp/fsp-rtc.c index 704648e..f60d2f3 100644 --- a/hw/fsp/fsp-rtc.c +++ b/hw/fsp/fsp-rtc.c @@ -457,8 +457,17 @@ static void rtc_flush_cached_tod(void) return; msg = fsp_mkmsg(FSP_CMD_WRITE_TOD, 3, y_m_d, (h_m_s_m >> 32) & 0xffffff00, 0); - if (msg) - fsp_queue_msg(msg, fsp_freemsg); + if (!msg) { + prerror("TPO: %s : Failed to allocate write TOD message\n", + __func__); + return; + } + if (fsp_queue_msg(msg, fsp_freemsg)) { + fsp_freemsg(msg); + prerror("TPO: %s : Failed to queue WRITE_TOD command\n", + __func__); + return; + } } static bool fsp_rtc_msg_rr(u32 cmd_sub_mod, struct fsp_msg *msg) |