summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-06-15 12:25:53 +0200
committerPatrick Rudolph <siro@das-labor.org>2019-06-16 16:45:48 +0000
commit14774769daae489834473457712cd4c635ac1fbd (patch)
tree57b08efe9fb977a6a8c4b4256f0812b090e56e03 /src/drivers
parentd3c5544bec154c469fbcb19b143f5131c5b417ea (diff)
downloadcoreboot-14774769daae489834473457712cd4c635ac1fbd.tar.xz
drivers/ipmi: Fix coding style
Fix 'do not use assignment in if condition'. Change-Id: I6e1b81a1b87de4315391618968c59cc3d3a66a77 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33492 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ipmi/ipmi_kcs.c18
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;
}