]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PCI: Simplify pci_find_(ext_)capability() return value checks
authorWei Yang <weiyang@linux.vnet.ibm.com>
Tue, 30 Jun 2015 01:16:44 +0000 (09:16 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 15 Jul 2015 04:35:36 +0000 (23:35 -0500)
commit0a1a9b49427f13b6e12366eb8f06b8094ab61447
treea423ceb7d5a017311094d2b3c4e8bc3788804829
parentfff905f32966109d513ae17afc6fe39f1c76bb67
PCI: Simplify pci_find_(ext_)capability() return value checks

The return value of the pci_find_(ext_)capability() is either zero or the
position of a capability.  It is never negative.

This patch consolidates the form of check from (pos <= 0) to (!pos).

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c