Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8506347ybl; Thu, 16 Jan 2020 18:20:01 -0800 (PST) X-Google-Smtp-Source: APXvYqwFObNOQtIS8C4M+1M7wwEZH5FLR64Q5rQ3f9VFR018DzKHpXu3HriWqOatum36wb3yO1OP X-Received: by 2002:aca:5d57:: with SMTP id r84mr1835616oib.42.1579227601764; Thu, 16 Jan 2020 18:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579227601; cv=none; d=google.com; s=arc-20160816; b=OzU9+oeURtKq0ijRC1/AbQ9YopTZbxj/7aSKutO6FQj9R6/EWthBxPB9ro5kSQBBDh jrcw7gnTUcR7IrTP85PwQPizLqNJo/RHzaal0RmgE50FLj8DOZ7KoAn/K+1xcfswAvN/ h/RHd3dne57zySD7ASSIDnmCVBeKbRPNVomlaY0WIVwQBR/SOHoK0M71iJHbE/GoYrt+ 5IAURhbsi2GaQ70qENsHVkmUBKG7bkHfVOUUd2iINQybVTXzOhWRA3jhZ+N86RvWyl/j 3grg12VJ+GMDqIBCryoMxP0361E3OcMIFYBEI1VUBIm8rkvOc+dcaUND8jReO54r+Yge Tzzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Sr7h2SqvDD19QNBOj5hvk+GPnMFynIEssa/89qmfmsI=; b=Xhpu+8tLK0aCwS5QiXpCshxXehoioIgQZnXJSuCrv2ymyt65VWCp62tdQ1UPH/hrH1 L0lPCURtIgNX73mcTi3hMrzTrkqhFw8n1Vkqc4Ad9xRX6lnZBX/hRcAwae5QIt/Iaorb qusWfEu5o3mwq6FMaM9MgHTvpQkt9kAgV0SU9Rpd8gfCNaILrFwOlRHYHu/iW4eLatv1 /qWAhVmqxgcjXYLLihl5tXu6U069Ekglq8+GIimhiHtsW9B2HIxEH1Utbug0x/R/AKjt /D/ck8llgx4opjzhP1v8shqD0+wPZYLCdrRMjYaxdL8AlE54X/sU0kgkIiMy/Q99xsr1 Ls1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cMPq7UJ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si13022028otn.108.2020.01.16.18.19.50; Thu, 16 Jan 2020 18:20:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cMPq7UJ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732440AbgAPXZR (ORCPT + 99 others); Thu, 16 Jan 2020 18:25:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729946AbgAPXZG (ORCPT ); Thu, 16 Jan 2020 18:25:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F6B22075B; Thu, 16 Jan 2020 23:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217105; bh=m8xS/QdXqDzMIWCYpmKHpbVJ73ewjXOb5tJMfMZoxEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cMPq7UJ24ApHpcc0QY5lT9iFVROdYZYYyTHoSorUL3K9L2jQT2rL5ImHJJhN1jSJ6 OusxBWdT3VrnVIzbZVW5M9G6jjBR4tPGCbzmJBvph7v50hAOFCa5CIAK3XEkMd2Nu8 gbr+efKwZVv0D+hFgtcvHzlrJodPtoLEDmL8+jRc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kieran Bingham , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.4 150/203] media: rcar-vin: Fix incorrect return statement in rvin_try_format() Date: Fri, 17 Jan 2020 00:17:47 +0100 Message-Id: <20200116231758.004486179@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Söderlund commit a0862a40364e2f87109317e31c51c9d7bc89e33f upstream. While refactoring code the return statement became corrupted, fix it by returning the correct return code. Reported-by: Kieran Bingham Fixes: 897e371389e77514 ("media: rcar-vin: simplify how formats are set and reset" Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -208,6 +208,7 @@ static int rvin_try_format(struct rvin_d ret = v4l2_subdev_call(sd, pad, set_fmt, pad_cfg, &format); if (ret < 0 && ret != -ENOIOCTLCMD) goto done; + ret = 0; v4l2_fill_pix_format(pix, &format.format); @@ -242,7 +243,7 @@ static int rvin_try_format(struct rvin_d done: v4l2_subdev_free_pad_config(pad_cfg); - return 0; + return ret; } static int rvin_querycap(struct file *file, void *priv,