Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2388309c authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mauro Carvalho Chehab
Browse files

[media] s5k5baf: Check v4l2_of_parse_endpoint() return value



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

Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fda8b13d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1868,8 +1868,11 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
		return -EINVAL;
	}

	v4l2_of_parse_endpoint(node_ep, &ep);
	ret = v4l2_of_parse_endpoint(node_ep, &ep);
	of_node_put(node_ep);
	if (ret)
		return ret;

	state->bus_type = ep.bus_type;

	switch (state->bus_type) {