Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / media / rc / rc-main.c
index 29f9000..a47ba33 100644 (file)
@@ -774,9 +774,12 @@ static ssize_t show_protocols(struct device *device,
        if (dev->driver_type == RC_DRIVER_SCANCODE) {
                enabled = dev->rc_map.rc_type;
                allowed = dev->allowed_protos;
-       } else {
+       } else if (dev->raw) {
                enabled = dev->raw->enabled_protocols;
                allowed = ir_raw_get_allowed_protocols();
+       } else {
+               mutex_unlock(&dev->lock);
+               return -ENODEV;
        }
 
        IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",