From 1c5cd3efa66246172a4354054cf2586d5a55acfd Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 14 Apr 2023 13:38:24 +0200 Subject: [PATCH] media: v4l: async: Don't check whether asd is NULL in validity check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The callers do pass a non-NULL asd to v4l2_async_nf_asd_valid() already. There's no need for the NULL check here. Signed-off-by: Sakari Ailus Tested-by: Philipp Zabel # imx6qp Tested-by: Niklas Söderlund # rcar + adv746x Reviewed-by: Laurent Pinchart Tested-by: Aishwarya Kothari # Apalis i.MX6Q with TC358743 Tested-by: Lad Prabhakar # Renesas RZ/G2L SMARC Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-async.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 9b79bcc..925ab55 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -554,9 +554,6 @@ static int v4l2_async_nf_asd_valid(struct v4l2_async_notifier *notifier, { struct device *dev = notifier_dev(notifier); - if (!asd) - return -EINVAL; - switch (asd->match_type) { case V4L2_ASYNC_MATCH_I2C: case V4L2_ASYNC_MATCH_FWNODE: -- 2.7.4