smsc75xx.c (de65d816aa44f9ddd79861ae21d75010cc1fd003) | smsc75xx.c (38673c8218a6bcaac97b0243089e33617e28f43f) |
---|---|
1 /*************************************************************************** 2 * 3 * Copyright (C) 2007-2010 SMSC 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. --- 1379 unchanged lines hidden (view full) --- 1388 1389 ret = usbnet_get_endpoints(dev, intf); 1390 if (ret < 0) { 1391 netdev_warn(dev->net, "usbnet_get_endpoints failed: %d\n", ret); 1392 return ret; 1393 } 1394 1395 dev->data[0] = (unsigned long)kzalloc(sizeof(struct smsc75xx_priv), | 1 /*************************************************************************** 2 * 3 * Copyright (C) 2007-2010 SMSC 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. --- 1379 unchanged lines hidden (view full) --- 1388 1389 ret = usbnet_get_endpoints(dev, intf); 1390 if (ret < 0) { 1391 netdev_warn(dev->net, "usbnet_get_endpoints failed: %d\n", ret); 1392 return ret; 1393 } 1394 1395 dev->data[0] = (unsigned long)kzalloc(sizeof(struct smsc75xx_priv), |
1396 GFP_KERNEL); | 1396 GFP_KERNEL); |
1397 1398 pdata = (struct smsc75xx_priv *)(dev->data[0]); | 1397 1398 pdata = (struct smsc75xx_priv *)(dev->data[0]); |
1399 if (!pdata) { 1400 netdev_warn(dev->net, "Unable to allocate smsc75xx_priv\n"); | 1399 if (!pdata) |
1401 return -ENOMEM; | 1400 return -ENOMEM; |
1402 } | |
1403 1404 pdata->dev = dev; 1405 1406 spin_lock_init(&pdata->rfe_ctl_lock); 1407 mutex_init(&pdata->dataport_mutex); 1408 1409 INIT_WORK(&pdata->set_multicast, smsc75xx_deferred_multicast_write); 1410 --- 874 unchanged lines hidden --- | 1401 1402 pdata->dev = dev; 1403 1404 spin_lock_init(&pdata->rfe_ctl_lock); 1405 mutex_init(&pdata->dataport_mutex); 1406 1407 INIT_WORK(&pdata->set_multicast, smsc75xx_deferred_multicast_write); 1408 --- 874 unchanged lines hidden --- |