nolo: Make sure that nolo_get_device return valid or unknown device
This commit is contained in:
1 parent
e75b963d3a
commit
3c4c0088f0
1 file changed
+3
-1
+3
-1
@@ -121,8 +121,10 @@ enum device nolo_get_device(struct usb_device_info * dev) {
|
||||
char buf[20];
|
||||
if ( nolo_identify_string(dev, "prod_code", buf, sizeof(buf)) < 0 )
|
||||
return DEVICE_UNKNOWN;
|
||||
else
|
||||
else if ( buf[0] )
|
||||
return device_from_string(buf);
|
||||
else
|
||||
return DEVICE_UNKNOWN;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user