From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D56C4C3276C for ; Thu, 2 Jan 2020 22:28:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D84F227BF for ; Thu, 2 Jan 2020 22:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004121; bh=kl4Ff26FZIbpndBMnWNEJ8X5DcfRqeLex2D91wYf+dI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vSqfDyyMQ0iyGkBa7JW5bkmxmXvWTTRORc3NKvQ8YdNJ+K/DZSxHd+X3TtITWEesq gzrZSl6s42wJvske6c7Zskgg5s72mgx2SctVH4/EXM+cppmrGAGBb5gyRVI+aG8JT3 poCEMVpYJI3QqqiTQZwPpO/rTb/ySdJL24dM+TOk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727384AbgABW2k (ORCPT ); Thu, 2 Jan 2020 17:28:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:58538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729892AbgABW2f (ORCPT ); Thu, 2 Jan 2020 17:28:35 -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 B642222525; Thu, 2 Jan 2020 22:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004115; bh=kl4Ff26FZIbpndBMnWNEJ8X5DcfRqeLex2D91wYf+dI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yiPWpS/PANE71wI8iU9l841wiEtgKpUBg9Fuyjdq6MUF4MEZWDJr4pwItFMn28C3i lU7UmxpcHxC//TPnm+9owLJm3BiyUnDYKSS+ZHDp/XqUpvweOQ5lQcslkkhpUeKn5G CCv2X5VZO7i3CNtKIY0Nv9BJpw1oflLRbtyS7BsQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benoit Parrot , Lad Prabhakar , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.9 016/171] media: am437x-vpfe: Setting STD to current value is not an error Date: Thu, 2 Jan 2020 23:05:47 +0100 Message-Id: <20200102220549.248125902@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.960200039@linuxfoundation.org> References: <20200102220546.960200039@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: Benoit Parrot [ Upstream commit 13aa21cfe92ce9ebb51824029d89f19c33f81419 ] VIDIOC_S_STD should not return an error if the value is identical to the current one. This error was highlighted by the v4l2-compliance test. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/am437x/am437x-vpfe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 05489a401c5c..bd500f12d0f7 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -1847,6 +1847,10 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id) if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD)) return -ENODATA; + /* if trying to set the same std then nothing to do */ + if (vpfe_standards[vpfe->std_index].std_id == std_id) + return 0; + /* If streaming is started, return error */ if (vb2_is_busy(&vpfe->buffer_queue)) { vpfe_err(vpfe, "%s device busy\n", __func__); -- 2.20.1