From patchwork Tue Jan 3 11:44:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 638966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0C41C46467 for ; Tue, 3 Jan 2023 11:45:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237424AbjACLpj (ORCPT ); Tue, 3 Jan 2023 06:45:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236914AbjACLpQ (ORCPT ); Tue, 3 Jan 2023 06:45:16 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D59C35F83; Tue, 3 Jan 2023 03:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1672746301; bh=hq1Mr8Cwby3ZbX2qb3uIoXDEXzZmuXFc29XcF8N/+r4=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=JOv+xNVKD5112S93a8c7aYmoCdX5KoU6wBhdnCWFfbKPJpGhoWZRjuks+zSBEsw75 SQPqDig8L+0Joav7loNL8qDYPMUh7sgIJsfpHPEyZZveFpTHIJKn7i+T7pkINA6PBZ A56vNK7INh6hKl8O63cSAqsmToub/440/EUs+c68= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Tue, 3 Jan 2023 12:45:01 +0100 (CET) X-EA-Auth: FA+GNfPw6PUD7+tjmQeBh7FR6EBoNuE5zSwpXBGXi4UNiowYmso+Xd15a3rfkgucAXYCHE1qTxBD6g3O2bSauSf9YlqOl8BE Date: Tue, 3 Jan 2023 17:14:55 +0530 From: Deepak R Varma To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: [PATCH] staging: media: imx: remove unnecessary return variable Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The function imx_media_fim_set_stream() can directly return 0 instead of using a ret variable which never changes its value. Issue identified using the returnvar.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/staging/media/imx/imx-media-fim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c index fb6590dcfc36..e719227d4323 100644 --- a/drivers/staging/media/imx/imx-media-fim.c +++ b/drivers/staging/media/imx/imx-media-fim.c @@ -373,7 +373,6 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, bool on) { unsigned long flags; - int ret = 0; v4l2_ctrl_lock(fim->ctrl[FIM_CL_ENABLE]); @@ -393,7 +392,7 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, fim->stream_on = on; out: v4l2_ctrl_unlock(fim->ctrl[FIM_CL_ENABLE]); - return ret; + return 0; } int imx_media_fim_add_controls(struct imx_media_fim *fim)