summaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorBolarinwa Olayemi Saheed <refactormyself@gmail.com>2020-07-13 19:55:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 10:52:59 +0200
commit0c6464954dbac7108d498877b6fc998a4f8e4b66 (patch)
tree4b8133eaf56c56b258dc45dd2cbd97b32c5c368b /lib/dynamic_debug.c
parent29f43a1e8d5c6adfb142e252ffa514a7dc505db6 (diff)
iwlegacy: Check the return value of pcie_capability_read_*()
[ Upstream commit 9018fd7f2a73e9b290f48a56b421558fa31e8b75 ] On failure pcie_capability_read_dword() sets it's last parameter, val to 0. However, with Patch 14/14, it is possible that val is set to ~0 on failure. This would introduce a bug because (x & x) == (~0 & x). This bug can be avoided without changing the function's behaviour if the return value of pcie_capability_read_dword is checked to confirm success. Check the return value of pcie_capability_read_dword() to ensure success. Suggested-by: Bjorn Helgaas <bjorn@helgaas.com> Signed-off-by: Bolarinwa Olayemi Saheed <refactormyself@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200713175529.29715-3-refactormyself@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions