Skip to content
Commit 0b2d7076 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

x86/PCI: Fix Broadcom CNB20LE unintended sign extension



In the expression "word1 << 16", word1 starts as u16, but is promoted to
a signed int, then sign-extended to resource_size_t, which is probably
not what was intended.  Cast to resource_size_t to avoid the sign
extension.

Found by Coverity (CID 138749, 138750).

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent c9eaa447
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment