Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11758968rwl; Tue, 3 Jan 2023 04:26:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXs9K2+ae5OCWoARm0sSr4Y9+1y2gp2CBx6o9NWUod+P1EiRDYNvPnJbz+ZRHZhETuJq7hYd X-Received: by 2002:aa7:955d:0:b0:582:d5e3:12a7 with SMTP id w29-20020aa7955d000000b00582d5e312a7mr536759pfq.6.1672748775960; Tue, 03 Jan 2023 04:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672748775; cv=none; d=google.com; s=arc-20160816; b=T9oHcMv4Z+t9gFw97NRtXNvT13JHfcTUOUafEdqPq+MQ7hLdvBn/osE3xy1O5H4vY8 vp18cbbYqXqBwP6iTC1Cv4AALrt315oKLW0bS5RtKXNKhqhjCsYwkazRvBsCbbSb9h3F q9bHKmPOulQMspE+9qKszCvEkEzKsRBQXE/P6x8GvckvPtnrOId3PMBq+HRZblV8bf/3 sEiYtZ/GT7FZes6Nn/TvYYZKRfdO+fXil6yRMOhXJB5JsG1sMZ7hwjlHge0BD/gJG82l cmJ/VBjQQaWXxlDghFKBiovSvoB0iHlxQaUgHbPBGFXtOUfGePSi6R5SkG9ITn7Ow4iI qZEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=VjPlBnjpRwdgIht9FKVS7dhX9Satoq8LaWKqVyIFLvA=; b=i4qfj7KbwYzEzcuUcZhakqgEcNCiRgzw0PDTP9aJr7RFAGFrsw9eBX+2Y1dvDik6JT zA55Lj8dKZ/KrIJ4UnpGWqZL1MZTEpz87dpx3/claa7qazqLl8LvCv8DmVGfSU66WfTn rakGq8ukAA7jW52CWty4rMcxo4ts7H+IprlpjiqrxBx2K1gz3IgxNtjsofehM0vveJmJ BJO1kocLR73za6BQD5E8XUnYvQKqc0bysNJmRs4MvDx+xhPfUqs7XxivgLYj+6OCRscZ G39d2y5E90WwUH+IjQUrLxN7JtZvpGujRmTM/OR+kcl7SVTIt3WsI64tgwqiz5Hk7Ox3 jQjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=JOv+xNVK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a056a00195500b005770e7ca31asi34761458pfk.239.2023.01.03.04.26.02; Tue, 03 Jan 2023 04:26:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=JOv+xNVK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233103AbjACLpk (ORCPT + 60 others); Tue, 3 Jan 2023 06:45:40 -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-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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) -- 2.34.1