diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-10-31 14:18:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-01 05:10:36 -0400 |
commit | 1acce5f72cfabcafee5e101b9ac7d71ebe1c7af9 (patch) | |
tree | a499e2bdb32546cb96015b4f6bce8d8be1023225 /include/media/v4l2-fwnode.h | |
parent | ceb3c45b43ffd69220233e309f0f6f0a9d3125a6 (diff) | |
download | lwn-1acce5f72cfabcafee5e101b9ac7d71ebe1c7af9.tar.gz lwn-1acce5f72cfabcafee5e101b9ac7d71ebe1c7af9.zip |
media: v4l2-fwnode: use the cached value instead of getting again
There is a get/put operation in order to get firmware is_available
data there at the __v4l2_async_notifier_parse_fwnode_endpoints()
function. However, instead of using it, the code just reads again
without the lock. That's a bug, as dev_fwnode isn't guaranteed
to be there once fwnode_handle_put() has been called on it.
This solves this smatch warning:
drivers/media/v4l2-core/v4l2-fwnode.c:453:8: warning: variable 'is_available' set but not used [-Wunused-but-set-variable]
bool is_available;
^~~~~~~~~~~~
Fixes: 9ca465312132 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device")
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/v4l2-fwnode.h')
0 files changed, 0 insertions, 0 deletions