# RE: \[PATCH net v3\] r8152: check the informaton of the device

- From: Hayes Wang \<hidden\>
- Date: 2021-05-24 08:55:09 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/05/1389101
- Thread: https://ratatoskr.run/netdev/2021/05/1387202/t.md

```text
Johan Hovold [ref]
> Sent: Monday, May 24, 2021 4:01 PM
[...]
> >  	/* The vendor mode is not always config #1, so to find it out. */
> >  	udev = interface_to_usbdev(intf);
> >  	c = udev->config;
> >  	num_configs = udev->descriptor.bNumConfigurations;
> > +	if (num_configs < 2)
> > +		return false;
> > +
> 
> Nit: This check looks unnecessary also as the driver can handle a single
> configuration just fine, and by removing it you'd be logging "Unexpected
> Device\n" below also in the single config case.

I just want to distinguish the devices.
It is acceptable if the device contains only one configuration.
A mistake occurs if the device has more configurations and
there is no expected one.
I would remove it if you think it is better.

Best Regards,
Hayes

```
