From 17a2bf798621ce8579f7563deaf4640f15931d0e Mon Sep 17 00:00:00 2001 From: Devendra Naga Date: Sun, 29 Jul 2012 03:28:47 +0000 Subject: [PATCH] seeq: use PTR_RET at init_module of driver the driver sees wether the dev_seeq pointer is having a error that can be read by using the PTR_ERR, and returns it at error case, other wise 0 at success case. the PTR_RET does the same thing, and use PTR_RET instead of redoing the code of PTR_RET Signed-off-by: Devendra Naga Acked-by: David Howells Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/ethernet/seeq/seeq8005.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/seeq/seeq8005.c b/drivers/net/ethernet/seeq/seeq8005.c index 698edbbfc149..d6e50de71186 100644 --- a/drivers/net/ethernet/seeq/seeq8005.c +++ b/drivers/net/ethernet/seeq/seeq8005.c @@ -736,9 +736,7 @@ MODULE_PARM_DESC(irq, "SEEQ 8005 IRQ number"); int __init init_module(void) { dev_seeq = seeq8005_probe(-1); - if (IS_ERR(dev_seeq)) - return PTR_ERR(dev_seeq); - return 0; + return PTR_RET(dev_seeq); } void __exit cleanup_module(void) -- 2.34.1