diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/ipmi/ipmi_kcs.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/drivers/ipmi/ipmi_kcs.c b/src/drivers/ipmi/ipmi_kcs.c index 8d106837f9..d17a1f98d2 100644 --- a/src/drivers/ipmi/ipmi_kcs.c +++ b/src/drivers/ipmi/ipmi_kcs.c @@ -144,34 +144,40 @@ static int ipmi_kcs_send_message(int port, int netfn, int lun, int cmd, { int ret; - if ((ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_START_WRITE))) { + ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_START_WRITE); + if (ret) { printk(BIOS_ERR, "IPMI START WRITE failed\n"); return ret; } - if ((ret = ipmi_kcs_send_data_byte(port, (netfn << 2) | (lun & 3)))) { + ret = ipmi_kcs_send_data_byte(port, (netfn << 2) | (lun & 3)); + if (ret) { printk(BIOS_ERR, "IPMI NETFN failed\n"); return ret; } - if ((ret = ipmi_kcs_send_data_byte(port, cmd))) { + ret = ipmi_kcs_send_data_byte(port, cmd); + if (ret) { printk(BIOS_ERR, "IPMI CMD failed\n"); return ret; } while (len-- > 1) { - if ((ret = ipmi_kcs_send_data_byte(port, *msg++))) { + ret = ipmi_kcs_send_data_byte(port, *msg++); + if (ret) { printk(BIOS_ERR, "IPMI BYTE WRITE failed\n"); return ret; } } - if ((ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_END_WRITE))) { + ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_END_WRITE); + if (ret) { printk(BIOS_ERR, "IPMI END WRITE failed\n"); return ret; } - if ((ret = ipmi_kcs_send_last_data_byte(port, *msg++))) { + ret = ipmi_kcs_send_last_data_byte(port, *msg++); + if (ret) { printk(BIOS_ERR, "IPMI BYTE WRITE failed\n"); return ret; } |