mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 04:56:43 +07:00
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>
This commit is contained in:
parent
5c49ac3ac6
commit
4ace2d28ab
@ -1095,7 +1095,7 @@ v4l2_fwnode_reference_parse_int_props(struct device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
return PTR_ERR(fwnode) == -ENOENT ? 0 : PTR_ERR(fwnode);
|
||||
return !fwnode || PTR_ERR(fwnode) == -ENOENT ? 0 : PTR_ERR(fwnode);
|
||||
|
||||
error:
|
||||
fwnode_handle_put(fwnode);
|
||||
|
Loading…
Reference in New Issue
Block a user