Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp52921ybg; Mon, 8 Jun 2020 16:12:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTuyu84kXyX6d5WAZtR7Nb85l4DJC+CujxxPpvNnyalod1+hl9l5eBVc1nuUFeeSO5Ho6s X-Received: by 2002:a05:6402:690:: with SMTP id f16mr25290563edy.9.1591657974778; Mon, 08 Jun 2020 16:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591657974; cv=none; d=google.com; s=arc-20160816; b=aCKMZImGY0ayKJ2k16jA88820hnzDHCqNsR9+8gliwPVtamzz+tvlKsDuPzQuzV5R1 lJ7d2k7x9BFCJ6L7iS/BWMKiSCFPDcan3fKOIyHVXSwDEuJOYVf+5VZH0MLP70A0CbyJ vBDyyKIN1LWXX3niC4XQzd1lo7Tm2tHZY7lIOsY7koHCxDu5M5sJ8czXHhDWUfL2qFFK KOUNGfuwFRWGqynCEQ4AkEYXfwm4jWs9OPZ/E816qaqZ3r3129mpJNKJjqrNo1aRn+bB pocJmwg3fASXBAImLAejnAPWEro8zpYKMt33RzF7JgT7dwJ8hEN2UQ+YtZ6lmAUm3gKj m1rg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=msw7PDkMeCJT6V8Hm+H4pSpiPqGC8d/isJlJ5gf8tS0=; b=Q9HB5A55bHoNtaGwE0HSapsfQhceQrUao7Nh70pz2jQC576o2bB+Xwmssv7UU+IlyE qqNfpIBaSYrJxMMwLzWmmW0kdSQDciCqAZy5EaIzJaLuFJrrCLDmeD2O0vwIvnmB+7Mt tHghXbi/2YTMC6Ag4RwK70iO898mSNxGFI2Vcoa9iLmwkiPHqnXHQXFAlNsMikz3NP0B J7BQp4GY+EAN+AGJvXw4LbRa4OMTKfmmzqflG1YV4LD0lvwibK4sbzhyXpkcVUjYSyh4 JDiKLWu/K6miOkiQPbbZOsXP4v1G4zPtDlgc7g+YFEYujsfX9J11aMkTfnBYlauaf2xX fjfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0M7iczwC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si10828162edx.191.2020.06.08.16.12.32; Mon, 08 Jun 2020 16:12:54 -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=@kernel.org header.s=default header.b=0M7iczwC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbgFHXIA (ORCPT + 99 others); Mon, 8 Jun 2020 19:08:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727836AbgFHXHP (ORCPT ); Mon, 8 Jun 2020 19:07:15 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A7592087E; Mon, 8 Jun 2020 23:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657635; bh=3YAXEK4s/GPg8WqzWmTln3TcNkCmuYxwrw8nQ+1yss8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0M7iczwC3xP1ohFOKS+sb3j8fD4sIcxZe3gd9Y0jx0Xa/0+azREVde1sB8M/mlA5z /p5x8Fx26+my98Oqq4qyXLMJd5Esr9UaN7jJ9/ewkted4U/0+ADDFULD6vnZBXxfM5 Fa+IjrL/49VPuJND3+ksyeXiGTV4WkQl6oX+b4OE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dafna Hirschfeld , Helen Koike , Dave Stevenson , Lad Prabhakar , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 053/274] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Date: Mon, 8 Jun 2020 19:02:26 -0400 Message-Id: <20200608230607.3361041-53-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dafna Hirschfeld [ Upstream commit b2bbf1aac61186ef904fd28079e847d3feadb89e ] When enumerating the frame sizes, the value sent to imx219_get_format_code should be fse->code (the code from the ioctl) and not imx219->fmt.code which is the code set currently in the driver. Fixes: 22da1d56e982 ("media: i2c: imx219: Add support for RAW8 bit bayer format") Signed-off-by: Dafna Hirschfeld Reviewed-by: Helen Koike Reviewed-by: Dave Stevenson Reviewed-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/imx219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index cb03bdec1f9c..86e0564bfb4f 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -781,7 +781,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd, if (fse->index >= ARRAY_SIZE(supported_modes)) return -EINVAL; - if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code)) + if (fse->code != imx219_get_format_code(imx219, fse->code)) return -EINVAL; fse->min_width = supported_modes[fse->index].width; -- 2.25.1