提交 17a2bf79 编写于 作者: D Devendra Naga 提交者: David S. Miller

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: NDevendra Naga <develkernel412222@gmail.com>
Acked-by: NDavid Howells <dhowells@redhat.com>
Reviewed-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ea4b3857
...@@ -736,9 +736,7 @@ MODULE_PARM_DESC(irq, "SEEQ 8005 IRQ number"); ...@@ -736,9 +736,7 @@ MODULE_PARM_DESC(irq, "SEEQ 8005 IRQ number");
int __init init_module(void) int __init init_module(void)
{ {
dev_seeq = seeq8005_probe(-1); dev_seeq = seeq8005_probe(-1);
if (IS_ERR(dev_seeq)) return PTR_RET(dev_seeq);
return PTR_ERR(dev_seeq);
return 0;
} }
void __exit cleanup_module(void) void __exit cleanup_module(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册