Commit 4a185e54 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: make bus_epilog match device_epilog

The paths in bus_epilog should match device_epilog.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3cb3fa3b
...@@ -965,7 +965,6 @@ bus_epilog(struct visor_device *bus_info, ...@@ -965,7 +965,6 @@ bus_epilog(struct visor_device *bus_info,
u32 cmd, struct controlvm_message_header *msg_hdr, u32 cmd, struct controlvm_message_header *msg_hdr,
int response, bool need_response) int response, bool need_response)
{ {
bool notified = false;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
down(&notifier_lock); down(&notifier_lock);
...@@ -1003,32 +1002,20 @@ bus_epilog(struct visor_device *bus_info, ...@@ -1003,32 +1002,20 @@ bus_epilog(struct visor_device *bus_info,
case CONTROLVM_BUS_CREATE: case CONTROLVM_BUS_CREATE:
if (busdev_notifiers.bus_create) { if (busdev_notifiers.bus_create) {
(*busdev_notifiers.bus_create) (bus_info); (*busdev_notifiers.bus_create) (bus_info);
notified = true; goto out_unlock;
} }
break; break;
case CONTROLVM_BUS_DESTROY: case CONTROLVM_BUS_DESTROY:
if (busdev_notifiers.bus_destroy) { if (busdev_notifiers.bus_destroy) {
(*busdev_notifiers.bus_destroy) (bus_info); (*busdev_notifiers.bus_destroy) (bus_info);
notified = true; goto out_unlock;
} }
break; break;
} }
} }
out_respond_and_unlock: out_respond_and_unlock:
if (notified) bus_responder(cmd, pmsg_hdr, response);
/* The callback function just called above is responsible
* for calling the appropriate visorchipset_busdev_responders
* function, which will call bus_responder()
*/
;
else
/*
* Do not kfree(pmsg_hdr) as this is the failure path.
* The success path ('notified') will call the responder
* directly and kfree() there.
*/
bus_responder(cmd, pmsg_hdr, response);
out_unlock: out_unlock:
up(&notifier_lock); up(&notifier_lock);
......
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