ChangeSet 1.1337.38.3, 2003/10/23 16:59:03-07:00, dhollis@davehollis.com [PATCH] USB: ax8817x fixes in usbnet.c * ax8817x_set_multicast - use address of dev->data, not contents * ax8817x_write_async_cmd - free request and urb if submit fails drivers/usb/net/usbnet.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Thu Oct 23 23:04:37 2003 +++ b/drivers/usb/net/usbnet.c Thu Oct 23 23:04:37 2003 @@ -493,8 +493,11 @@ (void *)req, data, size, ax8817x_async_cmd_callback, req); - if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) + if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { deverr(dev, "Error submitting the control message: status=%d", status); + kfree(req); + usb_free_urb(urb); + } } static void ax8817x_set_multicast(struct net_device *net) @@ -514,7 +517,7 @@ * for our 8 byte filter buffer * to avoid allocating memory that * is tricky to free later */ - u8 *multi_filter = (u8 *)dev->data; + u8 *multi_filter = (u8 *)&dev->data; struct dev_mc_list *mc_list = net->mc_list; u32 crc_bits; int i;