Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3471007imu; Sun, 11 Nov 2018 15:52:04 -0800 (PST) X-Google-Smtp-Source: AJdET5c0MqrxDLdkvLm1BQkdsi6ZPuANEvFgg15q2abH50lmdb+EKZWefBP4lUsNbCBHHuseVxUG X-Received: by 2002:a65:66ce:: with SMTP id c14mr15400377pgw.450.1541980324161; Sun, 11 Nov 2018 15:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980324; cv=none; d=google.com; s=arc-20160816; b=X/vF8Gm2Wymf9uISNLCizSZdCRGO3EPmxsEom46avcsRpkRQVdyMymreex3zW90xkQ GgswDkp5Gw+CLN1Nw2Qzq4AWb8ZdsCIIhxvUTF7A1FGv6ZmUvzIEYrb9tPYVoz/tjHRX MHzU70YnuSPfCe7AarXdsfFTzn0eEECSn35v74Lee+FTjYk2SpF8KOzaT1WFT9iKDtNB m+/MKGx6hXPva5Nj9o4c/WyVzp/QyiLpwVGOq1w8dz818/dGETxbxUBDma96lnvvZiVS 7VgkutcKzaF+Nfg/mFtwZKkiuHG6GKnSem9Fk6lTY2pispOwlFqVHxIQdQTqrDfsMCPi ybhw== 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=EDMcAXl1P7XaJQBJ6uyrtZLt/Wzn5tOc1Sekvt7vq2E=; b=f765mKEgKs9IRsINxexkAQqpHzOrbJhCszCeBpQccrIm09y4D30mfKYlBbJ/Dq4jtE YtO18UJacekMmXT9iG+6QzBa5ph1rHXm2kfI82u0pb80drGid3NKOGHkHRMPOGvtynL5 +i8hKZuclIS7iAcgspaIEn4dw8nMWcJTCfk3HBd6tOQzsJ3WPtvwz07neogna/aYhF8s /w+OefCcm/jS+OrbkWjvV3YlyioT29ptPVtw94Ina41Gyd+IDxYd44GH0uYdrN7lSyY2 GXufHccHXcElJb/b0FkKeXDU7dX90aQ0TfLNrxxgaJqcJRYxM0au7HPHSkvLmT6nQMOI +fZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h4oDMVyE; 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 v1-v6si16105885plb.234.2018.11.11.15.51.49; Sun, 11 Nov 2018 15:52:04 -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=h4oDMVyE; 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 S1732990AbeKLJlr (ORCPT + 99 others); Mon, 12 Nov 2018 04:41:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:37302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732875AbeKLISc (ORCPT ); Mon, 12 Nov 2018 03:18:32 -0500 Received: from localhost (unknown [206.108.79.134]) (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 51D932154B; Sun, 11 Nov 2018 22:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975316; bh=5uIHUeUwvvCiVdmHlKeBCAz154cXx1dFv3mzNw0zqkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h4oDMVyEoQPKm5NrSbNl9bDnMdX2jUo8sxInWGZybwkF97NC4XLKxprug2vFc4Ojd al8G4V4wOz7WVmoxCQIkjHiqsIq31FG2jaiei9gYRP3fcoKiMWq2CMBoMsoQjN0Mf2 uUzFyL66UBc2tNgWklBYmjCcnLS0c6nFTJaGTyRQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 4.19 305/361] media: em28xx: use a default format if TRY_FMT fails Date: Sun, 11 Nov 2018 14:20:52 -0800 Message-Id: <20181111221657.805726313@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mauro Carvalho Chehab commit f823ce2a1202d47110a7ef86b65839f0be8adc38 upstream. Follow the V4L2 spec, as warned by v4l2-compliance: warn: v4l2-test-formats.cpp(732): TRY_FMT cannot handle an invalid pixelformat. warn: v4l2-test-formats.cpp(733): This may or may not be a problem. For more information see: warn: v4l2-test-formats.cpp(734): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html Cc: stable@vger.kernel.org Fixes: bddcf63313c6 ("V4L/DVB (9927): em28xx: use a more standard way to specify video formats") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/em28xx/em28xx-video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1471,9 +1471,9 @@ static int vidioc_try_fmt_vid_cap(struct fmt = format_by_fourcc(f->fmt.pix.pixelformat); if (!fmt) { - em28xx_videodbg("Fourcc format (%08x) invalid.\n", - f->fmt.pix.pixelformat); - return -EINVAL; + fmt = &format[0]; + em28xx_videodbg("Fourcc format (%08x) invalid. Using default (%08x).\n", + f->fmt.pix.pixelformat, fmt->fourcc); } if (dev->board.is_em2800) {