Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[pandora-kernel.git] / drivers / media / IR / ir-sysfs.c
index d7da63e..2098dd1 100644 (file)
@@ -221,9 +221,10 @@ int ir_register_class(struct input_dev *input_dev)
        if (unlikely(devno < 0))
                return devno;
 
-       if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
-               ir_dev->dev.type = &rc_dev_type;
-       else
+       if (ir_dev->props) {
+               if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
+                       ir_dev->dev.type = &rc_dev_type;
+       } else
                ir_dev->dev.type = &ir_raw_dev_type;
 
        ir_dev->dev.class = &ir_input_class;