patch "USB: sisusbvga: fix oops in error path of sisusb_probe" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: sisusbvga: fix oops in error path of sisusb_probe
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 9a5729f68d3a82786aea110b1bfe610be318f80a Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Thu, 9 May 2019 14:41:50 +0200
Subject: USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must be set before the error is logged.
v2: fix that minor is not available before registration
--- drivers/usb/misc/sisusbvga/sisusb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/usb/misc/sisusbvga/sisusb.c +8 -7
@@ -3029,6 +3029,13 @@ static int sisusb_probe(struct usb_interface *intf,mutex_init (&(sisusb->lock)); + sisusb->sisusb_dev = dev; + sisusb->vrambase =SISUSB_PCI_MEMBASE ; + sisusb->mmiobase =SISUSB_PCI_MMIOBASE ; + sisusb->mmiosize =SISUSB_PCI_MMIOSIZE ; + sisusb->ioportbase =SISUSB_PCI_IOPORTBASE ; +/* Everything else is zero */ +/* Register device */ retval =usb_register_dev (intf, &usb_sisusb_class);if (retval) {
@@ -3039,13 +3046,7 @@ static int sisusb_probe(struct usb_interface *intf, goto error_1; } - sisusb->sisusb_dev = dev; - sisusb->minor = intf->minor; - sisusb->vrambase =SISUSB_PCI_MEMBASE ; - sisusb->mmiobase =SISUSB_PCI_MMIOBASE ; - sisusb->mmiosize =SISUSB_PCI_MMIOSIZE ; - sisusb->ioportbase =SISUSB_PCI_IOPORTBASE ; -/* Everything else is zero */ + sisusb->minor = intf->minor;/* Allocate buffers */ sisusb->ibufsize =SISUSB_IBUF_SIZE ;
Signature · 1 line
2.21.0