Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2483088pxj; Mon, 10 May 2021 04:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUmVWwJqp3JRq7KMTqShJBbZ8fYNK2a8M4lhozck+yprPfyBfqzKX/V+ewJWEwqHO8jELk X-Received: by 2002:a92:d143:: with SMTP id t3mr22696725ilg.241.1620645060983; Mon, 10 May 2021 04:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645060; cv=none; d=google.com; s=arc-20160816; b=l1mn2HpJpxelu8THAWKrbDUQG9+zZFaxcCouVoEVQ/k0PkBvv+TpIg6SafiGvqYY8H qyewiEov94+QAL3UP632LPZFPREUYorcJrwejvdKdvQqWA26+ijyceSkJFzPbcLjn2kM Kais9IrgocrzY8CWW7JodK6n7SFWihz0NHb+H2Z9HdrVjjGzoxlcGbRePIWHhs5hDnrd 9vrXUjPGtZlJuhs7Qxcqto8uJDEGoaMuBYMjPWGRJWMRID5Z6eFcJejHLEbE24l+1xtG bNp74tKDFx+vjOh3i79zUmPqkNyMmumBPTTnEh4gmpls4hpfPsy4HYyh9fMx1g90D8Qb ny6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=31ZSD30Q7luop3fzqNqxot7qGqItE0Vc3Kcjw6Omv2M=; b=LX2c9ZeZuFd5ptTXD5SHmE8ClBCiNNkO53faOCb6tKl2yx1rK/0bdI48T0txPnoZlj diAZMIQT4c5+zN8fuEnWtBzOkaib2JfEnu3/SpZcsd1+i0QDGe4sctlaz6CCw0mwALNq om2Zj+AxvfBDhug8YlUBVsKWQD41WAVzR7C5DfYfO8juSBF2TgnqebqaKY3YB1Gsf/C3 InO8aEC76mGQQjVqI3xJXZbcvJyWaUTH3Fj8J6Rj/hHb8OBcWUAZ/dYPEcqagzi4lxyc S4fVj2Iz5CwVjg6Wb82QqAxJoSTMdLr7L/nBvGCoVTlMG2Alyz16TaxfB5/rdh0xQzZA sMmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zycDBI4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r189si9467442jar.1.2021.05.10.04.10.48; Mon, 10 May 2021 04:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zycDBI4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234525AbhEJLEp (ORCPT + 99 others); Mon, 10 May 2021 07:04:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:58292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbhEJKpn (ORCPT ); Mon, 10 May 2021 06:45:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05D3B619A2; Mon, 10 May 2021 10:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642980; bh=8xW11yx65LCj4/dPIjgckIblW+bhn6N20VnQPTGV54c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zycDBI4cU813dgw76neFRpY73UQreMSl1P7J3C+LAfF0HaJb2Fz5IoZ6pNg0/ITub 5u7y1Aj/xmxPqxSAbvI+5aB1THs69lUBAVsny/3eIOKrNCOQ7Ms5pU6o1lR80KMjC2 ne5L9Dm/DpwkTWMFVfGwQBPSLGgDhgp/xyizkL0g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Rui Miguel Silva , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 131/299] media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt() Date: Mon, 10 May 2021 12:18:48 +0200 Message-Id: <20210510102009.299999808@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ Upstream commit cc271b6754691af74d710b761eaf027e3743e243 ] The correct return code to report an invalid pipeline configuration is -EPIPE. Return it instead of -EINVAL from __capture_legacy_try_fmt() when the capture format doesn't match the media bus format of the connected subdev. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/imx/imx-media-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c index c1931eb2540e..b2f2cb3d6a60 100644 --- a/drivers/staging/media/imx/imx-media-capture.c +++ b/drivers/staging/media/imx/imx-media-capture.c @@ -557,7 +557,7 @@ static int capture_validate_fmt(struct capture_priv *priv) priv->vdev.fmt.fmt.pix.height != f.fmt.pix.height || priv->vdev.cc->cs != cc->cs || priv->vdev.compose.width != compose.width || - priv->vdev.compose.height != compose.height) ? -EINVAL : 0; + priv->vdev.compose.height != compose.height) ? -EPIPE : 0; } static int capture_start_streaming(struct vb2_queue *vq, unsigned int count) -- 2.30.2