Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262962
b: refs/heads/master
c: 66a89b2
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Guenter Roeck committed Aug 11, 2011
1 parent f1d21e4 commit 44a862d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a2805e845761ea76a6ad5688d637b2624de0cab
refs/heads/master: 66a89b2164e2d30661edbd1953eacf0594d8203a
15 changes: 10 additions & 5 deletions trunk/drivers/hwmon/ibmaem.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,15 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg,
aem_send_message(ipmi);

res = wait_for_completion_timeout(&ipmi->read_complete, IPMI_TIMEOUT);
if (!res)
return -ETIMEDOUT;
if (!res) {
res = -ETIMEDOUT;
goto out;
}

if (ipmi->rx_result || ipmi->rx_msg_len != rs_size ||
memcmp(&rs_resp->id, &system_x_id, sizeof(system_x_id))) {
kfree(rs_resp);
return -ENOENT;
res = -ENOENT;
goto out;
}

switch (size) {
Expand All @@ -463,8 +465,11 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg,
break;
}
}
res = 0;

return 0;
out:
kfree(rs_resp);
return res;
}

/* Update AEM energy registers */
Expand Down

0 comments on commit 44a862d

Please sign in to comment.