Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c36d54ab380fb8edeaa22776af869c64bfda43bd
Commit:     c36d54ab380fb8edeaa22776af869c64bfda43bd
Parent:     cdd5a8fd24f5be43417a25c6feb8e7ebdce63098
Author:     Pete Zaitcev <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 00:42:53 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:15 2007 -0700

    usbmon: Smooth the core code
    
    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]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/mon/mon_main.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
index e58f761..2e317bd 100644
--- a/drivers/usb/mon/mon_main.c
+++ b/drivers/usb/mon/mon_main.c
@@ -148,18 +148,8 @@ static void mon_complete(struct usb_bus *ubus, struct urb 
*urb)
 {
        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 *ubus, struct urb 
*urb)
  */
 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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to