|
@@ -298,7 +298,7 @@ static int cbaf_cdid_get(struct cbaf *cbaf)
|
|
if (result < needed) {
|
|
if (result < needed) {
|
|
dev_err(dev, "Not enough data in DEVICE_INFO reply (%zu vs "
|
|
dev_err(dev, "Not enough data in DEVICE_INFO reply (%zu vs "
|
|
"%zu bytes needed)\n", (size_t)result, needed);
|
|
"%zu bytes needed)\n", (size_t)result, needed);
|
|
- return result;
|
|
|
|
|
|
+ return -ENOENT;
|
|
}
|
|
}
|
|
|
|
|
|
strlcpy(cbaf->device_name, di->DeviceFriendlyName, CBA_NAME_LEN);
|
|
strlcpy(cbaf->device_name, di->DeviceFriendlyName, CBA_NAME_LEN);
|
|
@@ -350,7 +350,7 @@ static ssize_t cbaf_wusb_chid_store(struct device *dev,
|
|
return result;
|
|
return result;
|
|
result = cbaf_cdid_get(cbaf);
|
|
result = cbaf_cdid_get(cbaf);
|
|
if (result < 0)
|
|
if (result < 0)
|
|
- return -result;
|
|
|
|
|
|
+ return result;
|
|
return size;
|
|
return size;
|
|
}
|
|
}
|
|
static DEVICE_ATTR(wusb_chid, 0600, cbaf_wusb_chid_show, cbaf_wusb_chid_store);
|
|
static DEVICE_ATTR(wusb_chid, 0600, cbaf_wusb_chid_show, cbaf_wusb_chid_store);
|