Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2157049iof; Tue, 7 Jun 2022 21:39:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr2P/Hcg76z6JO5QSVgvAsWw6htQTXhBl2vpP7eQpQlIKVhbBRj/DS1x7ckCLl5r/vbpmr X-Received: by 2002:a65:5207:0:b0:3fb:c00f:f6e4 with SMTP id o7-20020a655207000000b003fbc00ff6e4mr28202464pgp.415.1654663198948; Tue, 07 Jun 2022 21:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663198; cv=none; d=google.com; s=arc-20160816; b=KGNY7xoljhz0Le7PEtN2cx+HAtwfHgeSZAiDVtPGZ70SuJFNqaw6FrviDrniXwB/4O zAUPIoTl/L9An0mkRKgVKTISwVczA2flIjmqjP3ojUe0trqM4ZsZE49b2OjgIzdAxbwm Qrhk7IbOKYk6/7yXBvQzKcDVrIW+jiWJfxnSqmfnuHP5BFOIvMlk5RatlvOlaKw0+Qhy P/lxGc/P/bxrPnGACXGpQsD8qTAUZR32MkgpUPdJZjJp2whLNWN7RXiKmXBk9noXxDH/ QuMyrQj4C9mf3aggOGAzLThrYr/r5D2UbEAuiDFczhXhU4OtYw8M09/toAWRwoGYbbVh mfnw== 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=isL6mZuph3sQjk6svRVR9+LSU1RwhgOvHtJOaXgiZhg=; b=Jb34Y1BuIDVdmi96iZd9rsiCUyE0uPPfar1N9PvLAZjoSM4sTY1A2Z7pDLNlt8w9yF UshdMjU0kqENXJKM9Fiz08fDF2yl93SVaXhjKvYNGaoLAM5MvRuF553o2OJCfUEkw0QX Lz6mH2NgyR9oQgUrlrZXGb+OwUkwMWIxveFHvk3tYJDoUuX5lQg4vIDLg6+3/CIjRK4Q PEIKt0rNkZRjVeaWF84u/xzFqS6TxK9lhl5arICC1toFlu2A9zGRmaTALBfQKabbVj5p Ja958hZGs0ZW/QgK0rz0CHj10pLnoaaCneKZ6P3bZ1xzmBJzXQIEpdC5kqNHCgNltsov S1eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D985yuVa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u13-20020a170903124d00b00158d6f07b2esi27241641plh.85.2022.06.07.21.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D985yuVa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4CC5F5D5C8; Tue, 7 Jun 2022 21:06:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386198AbiFGWsg (ORCPT + 99 others); Tue, 7 Jun 2022 18:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381293AbiFGVk0 (ORCPT ); Tue, 7 Jun 2022 17:40:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D0DB16FEF1; Tue, 7 Jun 2022 12:06:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 40657B82182; Tue, 7 Jun 2022 19:06:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD19DC385A2; Tue, 7 Jun 2022 19:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628772; bh=2AEIenh73aLoWh9XjJ4hnoXRqQVSDuUQ2rYXV4WjRI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D985yuVaKE8Okks1lRB7XVMb9Omt/ZM9biuLc1VDAzjOzso0nFfX7icbITcDgcOuw ueEiFEK5w1BN6o1zCKdrFqwmezG6ULbsCnXHM26tATi+glvk1vt8dQlV/M5awF6drv A/gwJNjh00Qngw8FwGiEZRqMC1+kz7ywkXkkdJ08= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eugen Hristev , Jacopo Mondi , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 449/879] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Tue, 7 Jun 2022 18:59:27 +0200 Message-Id: <20220607165015.902057776@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eugen Hristev [ Upstream commit 91f49b80983f7bffdea9498209b2b896231ac776 ] While this does not happen in production, this check should be done versus the mask, as checking with the YCYC value may not include some bits that may be set. It is correct and safe to check the whole mask. Fixes: 123aaf816b95 ("media: atmel: atmel-sama5d2-isc: fix YUYV format") Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index e9415495e738..c2d50b0c0e3d 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -291,7 +291,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc) * Thus, if the YCYC mode is selected, replace it with the * sama5d2-compliant mode which is YYCC . */ - if ((rlp_mode & ISC_RLP_CFG_MODE_YCYC) == ISC_RLP_CFG_MODE_YCYC) { + if ((rlp_mode & ISC_RLP_CFG_MODE_MASK) == ISC_RLP_CFG_MODE_YCYC) { rlp_mode &= ~ISC_RLP_CFG_MODE_MASK; rlp_mode |= ISC_RLP_CFG_MODE_YYCC; } -- 2.35.1