提交 0f7ff395 编写于 作者: M Mauro Carvalho Chehab

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: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 cd79d33e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册