]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: fix return value check in tg3_read_vpd()
authorDavid Sterba <dsterba@suse.cz>
Wed, 29 Dec 2010 03:40:31 +0000 (03:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Dec 2010 20:31:01 +0000 (12:31 -0800)
commit4661f615df4425efef9cfb75814ec541783be9eb
tree81d9f10bf6dabd5b2a439bf9805892d5d056127b
parent02d063c7813731b83aead1d0f35758b489b6076c
tg3: fix return value check in tg3_read_vpd()

Besides -ETIMEDOUT and -EINTR, pci_read_vpd may return other error
values like -ENODEV or -EINVAL which are ignored due to the buggy
check, but the data are not read from VPD anyway and this is checked
subsequently with at most 3 needless loop iterations. This does not
show up as a runtime bug.

CC: Matt Carlson <mcarlson@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c