Re: potential NULL pointer followed in autosuspend_check() ?
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 20 Aug 2007, Oliver Neukum wrote:
> Hi,
>
> is it safe not to check driver for NULL?
>
> if (udev->quirks & USB_QUIRK_RESET_RESUME) {
> struct usb_driver *driver;
>
> driver = to_usb_driver(intf->dev.driver);
> if (!driver->reset_resume)
> return -EOPNOTSUPP;
> }
Yes. Above the code you quoted is the test:
if (!is_active(intf))
continue;
usbcore guarantees that is_active() will be false if no driver is bound
to the interface.
Alan Stern
-------------------------------------------------------------------------
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