Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3426313imu; Sun, 11 Nov 2018 14:50:09 -0800 (PST) X-Google-Smtp-Source: AJdET5ctZyLGSaHun5RUFdnOzZDc7AKTfPexqDE3weC3ueGHLMLz8/luJiQvmF4XI3mldtRKXR+J X-Received: by 2002:a62:15c7:: with SMTP id 190-v6mr17696384pfv.213.1541976609190; Sun, 11 Nov 2018 14:50:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976609; cv=none; d=google.com; s=arc-20160816; b=ELgwaeXgOWMZh1MrMQBUeSEMorGLeoSvcbZw1ybQiAciCKIE+zg/87A0HA6u6LpRLB CLOuwEG8v+sX6EbMlmxVFZzmxRxM50ySZs2gvnf0eVVmtZwAwFmJcVh/2mtvBW1vKqVC XrlLE4o4pIG4BAPlqfo5wNycBaFPT3jfdeykW+HsXF26ZT2rr7vLm8xk4bQcIOeQRJ/Z mDheHMWSwwxE89TCm515RAQPipHU9ocvgI0myuVZYsLfmb8YwEh52W8EoRb+ct2fNgU3 krCI9gCOsH0dpJreHBxQ3k5XXk4WVrt2MeiM9C+ICIHeRZ8exBsf0k6fsBATQ3OZYtCP 9mqQ== 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=CTsjxX3u81zE2HZs3Z6T5a9vB8HO4FHm7iUuopCh6cE=; b=zpwcGWbNKgJj8oBNNriVQ1mabAB6HyNOhq7vfuc9VsAA7rsNZ8OIZ7gKNIudWIRFcb 22qijk0npehg4P4iyAQxjTYZg+1J+mEOV+ibH23+xAGxOJzZjyCAncbRUmCavDrh3IY6 ZKqzhKubmwU/1fDFIEQPItYkrMBK4r1GNSZA71fNJzfDpaWpaL32JQBYbjlTvR11Evyz GIK4IY/XeMpo+DGFYhoiS81nO8qHMBjW7w/1QWxf3MsVFCxrfpF1zb2MWhhDpNURStlb cdW+X4KPNWxIm0Jw6X8ahVFJYlOZXJ9yaJ8en3ugNM/rsyaG+Y8RLDnKOqa8kPSZCLvA ttmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f1TbMT8F; 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 i2si14411332pgl.153.2018.11.11.14.49.54; Sun, 11 Nov 2018 14:50:09 -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=f1TbMT8F; 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 S2390249AbeKLIjh (ORCPT + 99 others); Mon, 12 Nov 2018 03:39:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:56418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404305AbeKLIXQ (ORCPT ); Mon, 12 Nov 2018 03:23:16 -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 AD3D321707; Sun, 11 Nov 2018 22:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975598; bh=ky1G/Ty/5m02OW88vwP+rUdhn1uh6gH7CjBZBPoDUnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1TbMT8FxDEi4SrpmADLFUepIygESjZH52gAxe7roDr1i1r/sA9YR1TLtUQuDUKyf GZxhisd3vh61U64AYFqkb+DkRhHVoTYg+XPwFb68e6Jl2oVlcDmGHYU96Bo7RYLq4d zJ0imca+KZiiPOFRBoHy174+ujTGEKyX2LWyCz34= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 4.14 184/222] media: em28xx: use a default format if TRY_FMT fails Date: Sun, 11 Nov 2018 14:24:41 -0800 Message-Id: <20181111221703.457559875@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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 @@ -1445,9 +1445,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) {