media: v4l2-fwnode: Avoid using PTR_ERR(NULL)
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 6 Jun 2019 14:18:42 +0000 (10:18 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 21:54:00 +0000 (17:54 -0400)
commit4ace2d28aba594e234923f55f476e97c56f6689a
treecbe1aa7e42f1fb37b854128a2e8e61450a8caaf2
parent5c49ac3ac6562a39baa2aece050a14b661197036
media: v4l2-fwnode: Avoid using PTR_ERR(NULL)

PTR_ERR(NULL) yields 0 which is commonly used to denote success. This is
the case here, and PTR_ERR(NULL) is apparently shunned upon. Fix this by
explicitly returning 0 if fwnode == NULL.

Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-fwnode.c