Skip to content

Commit

Permalink
V4L/DVB (13825): ir-core: Don't OOPS if IR device props is not defined
Browse files Browse the repository at this point in the history
As currently most drivers don't define ir_dev->props, we shouldn't assume
that this field is defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Feb 26, 2010
1 parent cd79d33 commit 0f7ff39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/IR/ir-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static ssize_t store_protocol(struct device *d,
return -EINVAL;
}

if (ir_dev->props->change_protocol)
if (ir_dev->props && ir_dev->props->change_protocol)
rc = ir_dev->props->change_protocol(ir_dev->props->priv,
ir_type);

Expand Down

0 comments on commit 0f7ff39

Please sign in to comment.