diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-16 23:43:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-16 23:43:01 -0800 |
commit | 8494347eedd2facf474021c615d1d07c62e04afd (patch) | |
tree | ceba54fc99271dc45c629b9a60e98022d9735a05 /drivers/net/wireless/p54/p54usb.c | |
parent | 91e9c07bd635353d1a278bdb38dbb56ac371bcb8 (diff) | |
parent | 505c92470bda486be589729514d3ed5302fb0551 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/p54/p54usb.c')
-rw-r--r-- | drivers/net/wireless/p54/p54usb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 17e199546ee..92af9b96bb7 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c @@ -426,12 +426,16 @@ static const char p54u_romboot_3887[] = "~~~~"; static int p54u_firmware_reset_3887(struct ieee80211_hw *dev) { struct p54u_priv *priv = dev->priv; - u8 buf[4]; + u8 *buf; int ret; - memcpy(&buf, p54u_romboot_3887, sizeof(buf)); + buf = kmalloc(4, GFP_KERNEL); + if (!buf) + return -ENOMEM; + memcpy(buf, p54u_romboot_3887, 4); ret = p54u_bulk_msg(priv, P54U_PIPE_DATA, - buf, sizeof(buf)); + buf, 4); + kfree(buf); if (ret) dev_err(&priv->udev->dev, "(p54usb) unable to jump to " "boot ROM (%d)!\n", ret); |