smsc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Wed, 6 Nov 2013 07:57:17 +0000 (15:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2013 08:01:59 +0000 (03:01 -0500)
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smc9194.c

index 51aa9cf3a3e7461b5e02e305de1ca163a24ed4a2..4092fed47e2f5896ca8d2f2d09d0d7681a005bae 100644 (file)
@@ -1569,9 +1569,7 @@ int __init init_module(void)
 
        /* copy the parameters from insmod into the device structure */
        devSMC9194 = smc_init(-1);
-       if (IS_ERR(devSMC9194))
-               return PTR_ERR(devSMC9194);
-       return 0;
+       return PTR_ERR_OR_ZERO(devSMC9194);
 }
 
 void __exit cleanup_module(void)