mwifiex: pcie: de-duplicate buffer allocation code
authorBrian Norris <briannorris@chromium.org>
Thu, 18 May 2017 16:34:47 +0000 (09:34 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 19 May 2017 06:01:19 +0000 (09:01 +0300)
commitd41bf5c1c0ed980366dc0d5174a3706309652c20
treecf4b5e359173522e3feb6063f9fbf5bfe9f5166b
parente8dc072dd50d89f012fa1b2d2c4914ae612c786a
mwifiex: pcie: de-duplicate buffer allocation code

This code was duplicated as part of the PCIe FLR code added to this
driver. Let's de-duplicate it to:

 * make things easier to read (mwifiex_pcie_free_buffers() now has a
   corresponding mwifiex_pcie_alloc_buffers())
 * reduce likelihood of bugs
 * make error logging equally verbose
 * save lines of code!

Also drop some of the commentary that isn't really needed.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c