Skip to content

Commit

Permalink
seeq: use PTR_RET at init_module of driver
Browse files Browse the repository at this point in the history
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 <develkernel412222@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Devendra Naga authored and David S. Miller committed Jul 30, 2012
1 parent ea4b385 commit 17a2bf7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/seeq/seeq8005.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17a2bf7

Please sign in to comment.