Two things:
- mbus can be NULL (in case of bus removal while reader is reading)
- Remove a useless assignment
Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
diff -urp -X dontdiff linux-2.6.23-rc3-gregkh/drivers/usb/mon/mon_main.c
linux-2.6.23-rc3-gregkh-pipe/drivers/usb/mon/mon_main.c
--- linux-2.6.23-rc3-gregkh/drivers/usb/mon/mon_main.c 2007-08-13
22:44:06.000000000 -0700
+++ linux-2.6.23-rc3-gregkh-pipe/drivers/usb/mon/mon_main.c 2007-08-14
00:15:39.000000000 -0700
@@ -148,18 +148,8 @@ static void mon_complete(struct usb_bus
{
struct mon_bus *mbus;
- mbus = ubus->mon_bus;
- if (mbus == NULL) {
- /*
- * This should not happen.
- * At this point we do not even know the bus number...
- */
- printk(KERN_ERR TAG ": Null mon bus in URB, address %p\n",
- urb);
- return;
- }
-
- mon_bus_complete(mbus, urb);
+ if ((mbus = ubus->mon_bus) != NULL)
+ mon_bus_complete(mbus, urb);
mon_bus_complete(&mon_bus0, urb);
}
@@ -170,7 +160,7 @@ static void mon_complete(struct usb_bus
*/
static void mon_stop(struct mon_bus *mbus)
{
- struct usb_bus *ubus = mbus->u_bus;
+ struct usb_bus *ubus;
struct list_head *p;
if (mbus == &mon_bus0) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel