Browse Source

[media] s5c73m3: Check v4l2_of_parse_endpoint() return value

The v4l2_of_parse_endpoint() function can fail so check the return value.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Javier Martinez Canillas 9 years ago
parent
commit
fda8b13ddc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/media/i2c/s5c73m3/s5c73m3-core.c

+ 3 - 1
drivers/media/i2c/s5c73m3/s5c73m3-core.c

@@ -1639,8 +1639,10 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
 		return 0;
 		return 0;
 	}
 	}
 
 
-	v4l2_of_parse_endpoint(node_ep, &ep);
+	ret = v4l2_of_parse_endpoint(node_ep, &ep);
 	of_node_put(node_ep);
 	of_node_put(node_ep);
+	if (ret)
+		return ret;
 
 
 	if (ep.bus_type != V4L2_MBUS_CSI2) {
 	if (ep.bus_type != V4L2_MBUS_CSI2) {
 		dev_err(dev, "unsupported bus type\n");
 		dev_err(dev, "unsupported bus type\n");