aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/p54usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/p54/p54usb.c')
-rw-r--r--drivers/net/wireless/p54/p54usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 6e635cfa24c8..043bd1c23c19 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -513,7 +513,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
513 if (!buf) 513 if (!buf)
514 return -ENOMEM; 514 return -ENOMEM;
515 515
516 left = block_size = min((size_t)P54U_FW_BLOCK, priv->fw->size); 516 left = block_size = min_t(size_t, P54U_FW_BLOCK, priv->fw->size);
517 strcpy(buf, p54u_firmware_upload_3887); 517 strcpy(buf, p54u_firmware_upload_3887);
518 left -= strlen(p54u_firmware_upload_3887); 518 left -= strlen(p54u_firmware_upload_3887);
519 tmp += strlen(p54u_firmware_upload_3887); 519 tmp += strlen(p54u_firmware_upload_3887);
@@ -1053,6 +1053,10 @@ static int p54u_probe(struct usb_interface *intf,
1053 priv->upload_fw = p54u_upload_firmware_net2280; 1053 priv->upload_fw = p54u_upload_firmware_net2280;
1054 } 1054 }
1055 err = p54u_load_firmware(dev, intf); 1055 err = p54u_load_firmware(dev, intf);
1056 if (err) {
1057 usb_put_dev(udev);
1058 p54_free_common(dev);
1059 }
1056 return err; 1060 return err;
1057} 1061}
1058 1062