Commit 81e7571e authored by Markus Boehme's avatar Markus Boehme Committed by Corey Minyard

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: default avatarMarkus Boehme <markubo@amazon.com>
Message-Id: <1599495937-10654-1-git-send-email-markubo@amazon.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 8a00e56a
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment