提交 76c39d42 编写于 作者: K K. Y. Srinivasan 提交者: 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: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 95ff7cde
......@@ -222,7 +222,7 @@ static void process_chn_event(u32 relid)
*/
channel = relid2channel(relid);
if (channel) {
if (channel && (channel->onchannel_callback != NULL)) {
channel->onchannel_callback(channel->channel_callback_context);
} else {
pr_err("channel not found for relid - %u\n", relid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册