diff options
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r-- | drivers/media/rc/rc-main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1c688..759a40a42eaa 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c | |||
@@ -789,8 +789,10 @@ static ssize_t show_protocols(struct device *device, | |||
789 | } else if (dev->raw) { | 789 | } else if (dev->raw) { |
790 | enabled = dev->raw->enabled_protocols; | 790 | enabled = dev->raw->enabled_protocols; |
791 | allowed = ir_raw_get_allowed_protocols(); | 791 | allowed = ir_raw_get_allowed_protocols(); |
792 | } else | 792 | } else { |
793 | mutex_unlock(&dev->lock); | ||
793 | return -ENODEV; | 794 | return -ENODEV; |
795 | } | ||
794 | 796 | ||
795 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", | 797 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", |
796 | (long long)allowed, | 798 | (long long)allowed, |
@@ -890,7 +892,8 @@ static ssize_t store_protocols(struct device *device, | |||
890 | 892 | ||
891 | if (i == ARRAY_SIZE(proto_names)) { | 893 | if (i == ARRAY_SIZE(proto_names)) { |
892 | IR_dprintk(1, "Unknown protocol: '%s'\n", tmp); | 894 | IR_dprintk(1, "Unknown protocol: '%s'\n", tmp); |
893 | return -EINVAL; | 895 | ret = -EINVAL; |
896 | goto out; | ||
894 | } | 897 | } |
895 | 898 | ||
896 | count++; | 899 | count++; |