- /* we only have a device, if we have an uevent file */
- if (!device_has_attribute(path, "/uevent", S_IWUSR))
+ /* we only have a device, if we have a dev and an uevent file */
+ if (!device_has_attribute(path, "/dev", S_IRUSR) ||
+ !device_has_attribute(path, "/uevent", S_IWUSR))