Skip to content

Commit

Permalink
[media] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...…
Browse files Browse the repository at this point in the history
…)) + PTR_ERR

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>
  • Loading branch information
Peter Huewe authored and Mauro Carvalho Chehab committed Feb 8, 2013
1 parent c2668c0 commit 7d0ee46
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/media/solo6x10/v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7d0ee46

Please sign in to comment.