usb.c (57adc1fcbae2c13104ce291b40f23e40a414fa87) usb.c (241b128b6b69ad41fc6f12cba45a3c3e64bce673)
1/*
2 * Copyright (c) 2007-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 338 unchanged lines hidden (view full) ---

347
348 ar_usb = ath6kl_usb_create(interface);
349
350 if (ar_usb == NULL) {
351 ret = -ENOMEM;
352 goto err_usb_put;
353 }
354
1/*
2 * Copyright (c) 2007-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 338 unchanged lines hidden (view full) ---

347
348 ar_usb = ath6kl_usb_create(interface);
349
350 if (ar_usb == NULL) {
351 ret = -ENOMEM;
352 goto err_usb_put;
353 }
354
355 ar = ath6kl_core_alloc(&ar_usb->udev->dev);
355 ar = ath6kl_core_create(&ar_usb->udev->dev);
356 if (ar == NULL) {
357 ath6kl_err("Failed to alloc ath6kl core\n");
358 ret = -ENOMEM;
359 goto err_usb_destroy;
360 }
361
362 ar->hif_priv = ar_usb;
363 ar->hif_type = ATH6KL_HIF_TYPE_USB;

--- 7 unchanged lines hidden (view full) ---

371 if (ret) {
372 ath6kl_err("Failed to init ath6kl core: %d\n", ret);
373 goto err_core_free;
374 }
375
376 return ret;
377
378err_core_free:
356 if (ar == NULL) {
357 ath6kl_err("Failed to alloc ath6kl core\n");
358 ret = -ENOMEM;
359 goto err_usb_destroy;
360 }
361
362 ar->hif_priv = ar_usb;
363 ar->hif_type = ATH6KL_HIF_TYPE_USB;

--- 7 unchanged lines hidden (view full) ---

371 if (ret) {
372 ath6kl_err("Failed to init ath6kl core: %d\n", ret);
373 goto err_core_free;
374 }
375
376 return ret;
377
378err_core_free:
379 ath6kl_core_free(ar);
379 ath6kl_core_destroy(ar);
380err_usb_destroy:
381 ath6kl_usb_destroy(ar_usb);
382err_usb_put:
383 usb_put_dev(dev);
384
385 return ret;
386}
387

--- 44 unchanged lines hidden ---
380err_usb_destroy:
381 ath6kl_usb_destroy(ar_usb);
382err_usb_put:
383 usb_put_dev(dev);
384
385 return ret;
386}
387

--- 44 unchanged lines hidden ---