[media] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
authorPeter Huewe <PeterHuewe@gmx.de>
Fri, 25 Jan 2013 22:10:12 +0000 (19:10 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 8 Feb 2013 15:02:50 +0000 (13:02 -0200)
Found with coccicheck.
The semantic patch that makes this change is available
in scripts/coccinelle/api/ptr_ret.cocci.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/solo6x10/v4l2.c

index 571c3a348d300817343678140851f29720a5a31e..ca774cc57539f48a12760c13392d195e4fa32147 100644 (file)
@@ -415,10 +415,7 @@ static int solo_start_thread(struct solo_filehandle *fh)
 {
        fh->kthread = kthread_run(solo_thread, fh, SOLO6X10_NAME "_disp");
 
-       if (IS_ERR(fh->kthread))
-               return PTR_ERR(fh->kthread);
-
-       return 0;
+       return PTR_RET(fh->kthread);
 }
 
 static void solo_stop_thread(struct solo_filehandle *fh)