From patchwork Fri Jan 25 23:10:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Huewe X-Patchwork-Id: 2048231 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9E49A3FD1A for ; Fri, 25 Jan 2013 23:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441Ab3AYXGz (ORCPT ); Fri, 25 Jan 2013 18:06:55 -0500 Received: from mout.gmx.net ([212.227.15.19]:60615 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783Ab3AYXGy (ORCPT ); Fri, 25 Jan 2013 18:06:54 -0500 Received: from mailout-de.gmx.net ([10.1.76.35]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0LsMyM-1V0vDA3vs8-011x46 for ; Sat, 26 Jan 2013 00:06:52 +0100 Received: (qmail invoked by alias); 25 Jan 2013 23:06:52 -0000 Received: from dslb-084-056-054-055.pools.arcor-ip.net (EHLO localhost.localdomain) [84.56.54.55] by mail.gmx.net (mp035) with SMTP; 26 Jan 2013 00:06:52 +0100 X-Authenticated: #12255092 X-Provags-ID: V01U2FsdGVkX1/Tc5UnW1DTA5fD+itv475odBMsz9R65gHlN0cqFH +LAK76PVjmzJJr From: Peter Huewe To: Ben Collins Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , Peter Huewe , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR Date: Sat, 26 Jan 2013 00:10:12 +0100 Message-Id: <1359155412-2080-1-git-send-email-peterhuewe@gmx.de> X-Mailer: git-send-email 1.7.8.6 X-Y-GMX-Trusted: 0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Found with coccicheck. The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. Signed-off-by: Peter Huewe --- 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)