]> git.baikalelectronics.ru Git - kernel.git/commit
x86/PCI: Fix Broadcom CNB20LE unintended sign extension
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:01:08 +0000 (11:01 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:01:08 +0000 (11:01 -0600)
commit520a5e5da5e895315b53f687d03e3936603942a6
treebf37d69370a9789abf725e022e2c5c39b40c4a3b
parent55addf3150ef37e6b38d415547cc6f20b4d9aca1
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: Bjorn Helgaas <bhelgaas@google.com>
arch/x86/pci/broadcom_bus.c