Message ID | 616e0a918957ce9936478574a4856df742c20ad7.camel@hadess.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/3] USB: Simplify USB ID table match | expand |
On Sat, Jul 25, 2020 at 11:13:12AM +0200, Bastien Nocera wrote: > usb_device_match_id() supports being passed NULL tables, so no need to > check for it. > > Signed-off-by: Bastien Nocera <hadess@hadess.net> > --- > drivers/usb/core/generic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c > index 4626227a6dd2..b6f2d4b44754 100644 > --- a/drivers/usb/core/generic.c > +++ b/drivers/usb/core/generic.c > @@ -205,8 +205,6 @@ static int __check_usb_generic(struct device_driver *drv, void *data) > udrv = to_usb_device_driver(drv); > if (udrv == &usb_generic_driver) > return 0; > - if (!udrv->id_table) > - return 0; > > return usb_device_match_id(udev, udrv->id_table) != NULL; > } Acked-by: Alan Stern <stern@rowland.harvard.edu>
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index 4626227a6dd2..b6f2d4b44754 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -205,8 +205,6 @@ static int __check_usb_generic(struct device_driver *drv, void *data) udrv = to_usb_device_driver(drv); if (udrv == &usb_generic_driver) return 0; - if (!udrv->id_table) - return 0; return usb_device_match_id(udev, udrv->id_table) != NULL; }
usb_device_match_id() supports being passed NULL tables, so no need to check for it. Signed-off-by: Bastien Nocera <hadess@hadess.net> --- drivers/usb/core/generic.c | 2 -- 1 file changed, 2 deletions(-)