aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMarkus Boehme <markubo@amazon.com>2020-09-07 18:25:35 +0200
committerCorey Minyard <cminyard@mvista.com>2020-09-15 08:52:27 -0500
commit81e7571ea35e2b8b74b777ac8484818c8a984ea9 (patch)
tree83b8892fea4cb61cc6390bc4a2135580fafab64e /drivers/char
parentipmi: add a newline when printing parameter 'panic_op' by sysfs (diff)
downloadlinux-dev-81e7571ea35e2b8b74b777ac8484818c8a984ea9.tar.xz
linux-dev-81e7571ea35e2b8b74b777ac8484818c8a984ea9.zip
ipmi: Reset response handler when failing to send the command
When failing to send a command we don't expect a response. Clear the `null_user_handler` like is done in the success path. Signed-off-by: Markus Boehme <markubo@amazon.com> Message-Id: <1599495937-10654-1-git-send-email-markubo@amazon.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index ed888d5a33ae..9f61a1a30f2f 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2433,7 +2433,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)
rv = send_get_device_id_cmd(intf);
if (rv)
- return rv;
+ goto out_reset_handler;
wait_event(intf->waitq, bmc->dyn_id_set != 2);
@@ -2443,6 +2443,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)
/* dyn_id_set makes the id data available. */
smp_rmb();
+out_reset_handler:
intf->null_user_handler = NULL;
return rv;
@@ -3329,6 +3330,7 @@ static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id)
dev_warn(intf->si_dev,
"Error sending channel information for channel 0, %d\n",
rv);
+ intf->null_user_handler = NULL;
return -EIO;
}