* [PATCH] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
@ 2013-01-25 23:10 Peter Huewe
0 siblings, 0 replies; only message in thread
From: Peter Huewe @ 2013-01-25 23:10 UTC (permalink / raw)
To: Ben Collins
Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Peter Huewe,
linux-media, devel, linux-kernel
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>
---
drivers/staging/media/solo6x10/v4l2.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/solo6x10/v4l2.c b/drivers/staging/media/solo6x10/v4l2.c
index 571c3a3..ca774cc 100644
--- a/drivers/staging/media/solo6x10/v4l2.c
+++ b/drivers/staging/media/solo6x10/v4l2.c
@@ -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)
--
1.7.8.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-25 23:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 23:10 [PATCH] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR Peter Huewe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®