From: Mauro Carvalho Chehab Date: Thu, 17 Dec 2009 02:46:48 +0000 (-0300) Subject: V4L/DVB (13825): ir-core: Don't OOPS if IR device props is not defined X-Git-Tag: firefly_0821_release~9833^2~3102^2~350 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f7ff39532f1d2328e54b65ce5022c71f06e44d6;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index d67c11d9921f..6ec7f89d5142 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c @@ -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);