Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c36d54ab authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman
Browse files

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: default avatarPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cdd5a8fd
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -148,17 +148,7 @@ 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;
	}

	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) {