mwifiex: failure case handling for PCIe events
authorAmitkumar Karwar <akarwar@marvell.com>
Fri, 9 Dec 2011 04:41:03 +0000 (20:41 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Dec 2011 20:33:20 +0000 (15:33 -0500)
commit8c53e42dea5905aee2a97e6af5874432f27b5c03
tree443f3dbec3cda5786e122ad495b0facda0badb0b
parentb0327ffa8cfe69ce2d380200c2097b86c6b3efd9
mwifiex: failure case handling for PCIe events

Event buffers for PCIe interface are allocated during driver
initialisation, and respective physical addresses are sent to FW
in *_PCIE_DESC_DETAILS command so that FW can do DMA. These buffers
will be freed while unloading the driver. Therefore we should not
free them in event handling error path. Also we should skip next
pending events in failure case.

Also fixed 'returning -1 instead of -ENOMEM is sloppy' warnings.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/pcie.c