Skip to content

Commit

Permalink
drivers: platform: x86: Use PTR_RET function
Browse files Browse the repository at this point in the history
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Alexandru Gheorghiu authored and Matthew Garrett committed May 8, 2013
1 parent 0572b12 commit 2fbaf9b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/platform/x86/samsung-q10.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ static int __init samsungq10_init(void)
samsungq10_probe,
NULL, 0, NULL, 0);

if (IS_ERR(samsungq10_device))
return PTR_ERR(samsungq10_device);

return 0;
return PTR_RET(samsungq10_device);
}

static void __exit samsungq10_exit(void)
Expand Down

0 comments on commit 2fbaf9b

Please sign in to comment.