V4L/DVB (13825): ir-core: Don't OOPS if IR device props is not defined
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>
This commit is contained in:
parent
cd79d33e16
commit
0f7ff39532
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue