On Tue, May 05, 2015 at 06:36:07PM -0400, Benjamin Romer wrote:
> -void
> -devmajorminor_remove_file(struct visor_device *dev, int slot)
> -{
> -     int maxdevnodes = ARRAY_SIZE(dev->devnodes) / sizeof(dev->devnodes[0]);
> -     struct devmajorminor_attribute *myattr = NULL;
> -
> -     if (slot < 0 || slot >= maxdevnodes)
> -             return;
> -     myattr = (struct devmajorminor_attribute *)(dev->devnodes[slot].attr);
> -     if (myattr)
> -             return;

You didn't introduce it, but this condition seems reversed.

> -     sysfs_remove_file(&dev->kobjdevmajorminor, &myattr->attr);
> -     kobject_uevent(&dev->device.kobj, KOBJ_OFFLINE);
> -     dev->devnodes[slot].attr = NULL;
> -     kfree(myattr);
> -}


regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to