brcm80211: Remove bogus memcpy in ai_detach
[pandora-kernel.git] / drivers / usb / wusbcore / cbaf.c
index c0c5665..200fd7c 100644 (file)
@@ -298,7 +298,7 @@ static int cbaf_cdid_get(struct cbaf *cbaf)
        if (result < needed) {
                dev_err(dev, "Not enough data in DEVICE_INFO reply (%zu vs "
                        "%zu bytes needed)\n", (size_t)result, needed);
-               return result;
+               return -ENOENT;
        }
 
        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;
        result = cbaf_cdid_get(cbaf);
        if (result < 0)
-               return -result;
+               return result;
        return size;
 }
 static DEVICE_ATTR(wusb_chid, 0600, cbaf_wusb_chid_show, cbaf_wusb_chid_store);