Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268128
b: refs/heads/master
c: 2432603
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent ea631b8 commit c524b6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7341d908af307a34098a9da52f49037d815c868f
refs/heads/master: 24326039b9685e8bfb1532932e18cb458f2a3517
18 changes: 16 additions & 2 deletions trunk/drivers/staging/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,25 @@ static void process_chn_event(u32 relid)
*/
channel = relid2channel(relid);

if (!channel) {
pr_err("channel not found for relid - %u\n", relid);
return;
}

/*
* A channel once created is persistent even when there
* is no driver handling the device. An unloading driver
* sets the onchannel_callback to NULL under the
* protection of the channel inbound_lock. Thus, checking
* and invoking the driver specific callback takes care of
* orderly unloading of the driver.
*/

spin_lock_irqsave(&channel->inbound_lock, flags);
if (channel && (channel->onchannel_callback != NULL))
if (channel->onchannel_callback != NULL)
channel->onchannel_callback(channel->channel_callback_context);
else
pr_err("channel not found for relid - %u\n", relid);
pr_err("no channel callback for relid - %u\n", relid);

spin_unlock_irqrestore(&channel->inbound_lock, flags);
}
Expand Down

0 comments on commit c524b6e

Please sign in to comment.