]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: clean up qlcnic_init_pci_info()
authorDan Carpenter <error27@gmail.com>
Mon, 9 Aug 2010 21:47:56 +0000 (21:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Aug 2010 08:34:36 +0000 (01:34 -0700)
commita02a09b6d1b6af622c7841027c85e9b61e00f908
tree814076c69d1779aa3fe04fd2b0c3c9a2e09aa054
parent1f2135f3a4e627043392625dab0b35702102b330
qlcnic: clean up qlcnic_init_pci_info()

In the original code we allocated memory conditionally and freed it in
the error handling unconditionally.  It turns out that this function is
only called during initialization and "adapter->npars" and
"adapter->eswitch" are always NULL at the start of the function.  I
removed those checks.

Also since I was cleaning things, I changed the error handling for
qlcnic_get_pci_info() and pulled everything in an indent level.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_main.c