Commit 76c39d42 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: vmbus: Check before invoking the channel callback

When we close a channel, we set the corresponding callback function to NULL.
Check before invoking the channel callback.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 95ff7cde
...@@ -222,7 +222,7 @@ static void process_chn_event(u32 relid) ...@@ -222,7 +222,7 @@ static void process_chn_event(u32 relid)
*/ */
channel = relid2channel(relid); channel = relid2channel(relid);
if (channel) { if (channel && (channel->onchannel_callback != NULL)) {
channel->onchannel_callback(channel->channel_callback_context); channel->onchannel_callback(channel->channel_callback_context);
} else { } else {
pr_err("channel not found for relid - %u\n", relid); pr_err("channel not found for relid - %u\n", relid);
......
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