summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/netdev.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-07-25 14:22:59 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 21:19:35 +0200
commit2a21f86917f7a9fe13b180e895a816871a234dee (patch)
treea9411d3d1d1a10a608a6c0ffc7d8b1c50f2922f1 /drivers/net/wireless/iwmc3200wifi/netdev.c
parentiwlagn: fix minimum number of queues setting (diff)
downloadlinux-2a21f86917f7a9fe13b180e895a816871a234dee.tar.xz
linux-2a21f86917f7a9fe13b180e895a816871a234dee.zip
wireless: ERR_PTR vs null
iwm_wdev_alloc() returns an ERR_PTR on failure and not null. It also prints its own dev_err() message so I removed that as well. Compile tested only. Sorry. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/netdev.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/netdev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c
index aea5ccf24ccf..bf294e41753b 100644
--- a/drivers/net/wireless/iwmc3200wifi/netdev.c
+++ b/drivers/net/wireless/iwmc3200wifi/netdev.c
@@ -106,10 +106,8 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,
int ret = 0;
wdev = iwm_wdev_alloc(sizeof_bus, dev);
- if (!wdev) {
- dev_err(dev, "no memory for wireless device instance\n");
- return ERR_PTR(-ENOMEM);
- }
+ if (IS_ERR(wdev))
+ return wdev;
iwm = wdev_to_iwm(wdev);
iwm->bus_ops = if_ops;