All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] staging: wlags49_h2: fix error return code in wl_adapter_insert()
@ 2013-05-17  8:43 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2013-05-17  8:43 UTC (permalink / raw)
  To: pe1dnn, gregkh, khoroshilov; +Cc: yongjun_wei, devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

When return from wl_adapter_insert() in the register_netdev() error
handling case, 'ret' which is 0 is returned, but we should return a
negative error code instead, so fix to return the return value of
register_netdev().

Introduce by commit 657d4c86d4cd85a4696445f6fb2fe0941a5724ff
(staging: wlags49_h2: fix error handling in pcmcia probe function)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/staging/wlags49_h2/wl_cs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c
index f9e5fd3..b55dc43 100644
--- a/drivers/staging/wlags49_h2/wl_cs.c
+++ b/drivers/staging/wlags49_h2/wl_cs.c
@@ -259,7 +259,8 @@ int wl_adapter_insert(struct pcmcia_device *link)
 	dev->base_addr  = link->resource[0]->start;
 
 	SET_NETDEV_DEV(dev, &link->dev);
-	if (register_netdev(dev) != 0) {
+	ret = register_netdev(dev);
+	if (ret != 0) {
 		printk("%s: register_netdev() failed\n", MODULE_NAME);
 		goto failed;
 	}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-17  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17  8:43 [PATCH -next] staging: wlags49_h2: fix error return code in wl_adapter_insert() Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.