wimax/i2400m: Ensure boot mode cmd and ack buffers are alloc'd before first message

The change to the SDIO boot mode RX chain could try to use the cmd and
ack buffers befor they were allocated.  USB does not have the problem
but both were changed for consistency's sake.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
This commit is contained in:
Dirk Brandewie
2009-08-18 08:51:52 -07:00
committed by Inaky Perez-Gonzalez
parent 81b182a754
commit a134fd6b10
4 changed files with 64 additions and 14 deletions

View File

@@ -419,6 +419,12 @@ int i2400mu_probe(struct usb_interface *iface,
usb_dev->autosuspend_disabled = 0;
#endif
result = i2400m_bm_buf_alloc(i2400m);
if (result < 0) {
dev_err(dev, "cannot allocate USB bootmode buffer\n");
goto error_bm_buf_alloc;
}
result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT);
if (result < 0) {
dev_err(dev, "cannot setup device: %d\n", result);
@@ -434,6 +440,8 @@ int i2400mu_probe(struct usb_interface *iface,
error_debugfs_add:
i2400m_release(i2400m);
error_setup:
i2400m_bm_buf_free(i2400m);
error_bm_buf_alloc:
usb_set_intfdata(iface, NULL);
usb_put_dev(i2400mu->usb_dev);
free_netdev(net_dev);