Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3625671pxb; Mon, 24 Jan 2022 13:49:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+9yWrjD+YalpywVN34pZyWODxuzaXR8ESqD4iklV+NpZt5jzvEXGaqvS8m1j1upXXsTzx X-Received: by 2002:a17:90a:e7c8:: with SMTP id kb8mr312383pjb.35.1643060967629; Mon, 24 Jan 2022 13:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060967; cv=none; d=google.com; s=arc-20160816; b=ri+UV2dMVqpBm11lKJrd0GLxmiCVr86iGWfXOkHaUkvJpjmMabdv/PywbKjXMTvC0J iOrdtqrpvxfniQmqUYhqRS6ZmJsSE4bO/0Ez2sNGIjFGcWQLRwut21g12kuZP/ast7J+ nCdvr1CAc1Pp46C8XP0GW0Mi9Pi4u9uL6lmAFNTLVUwYKwhiS/0uWE6A2B1mHdu1612j 4Y0ZL2rVdF0WfmrWZzIXiLKI2D4vAMb8cKi4Yhs8L0sxA96udVY33C9ZMcdnSE+CwXjK oPAnSsPrxWYd9G8jbQRAKR5p/w7gzo8CVcpxskJ6wmRoWWA7Qtp3in+xU2lc2y0WYm7r 92Xw== 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=3yMsPF9JrdryLDS2hKsm9YcU+iRupsTbXeMqm0JcEt8=; b=PFuxW5/1PxI+Y3ZEePjmDS2SDHMnspFyAb1CaIIQjyavlrGeolvZ51mJ4e1Z555toT zl/c+Pjd9MDj/BDYA1D3BMJXu0Mi6lACtoqzSCXTvd9WtNXkMMcNL7XQebMOKGFEesE5 J1d+NS/W8gYUqNZlFlcsgrivCGOAoRFcrGwvHu6UZg1ekmCzOjv8pHXVBF0r5avYSgkU pTG/bH8wPjJXAmAeFPmCSHPbJzN6D9WMeT+l6Y+aLW1Df8JFcGR6Z4eDcQOXLX5wT+VQ P3ilkhQHkS0M9M99+zwgNWQrtbm8V/Cf3ndziUaE3DgG/MPnTAVkq0dgFssucznCjkZI SETQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RVZ0cIeS; 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 195si13837373pga.696.2022.01.24.13.49.00; Mon, 24 Jan 2022 13:49:27 -0800 (PST) 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=RVZ0cIeS; 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 S1455694AbiAXVfx (ORCPT + 99 others); Mon, 24 Jan 2022 16:35:53 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:54954 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444229AbiAXVA2 (ORCPT ); Mon, 24 Jan 2022 16:00:28 -0500 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 667C0B810A8; Mon, 24 Jan 2022 21:00:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A940C340E5; Mon, 24 Jan 2022 21:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058024; bh=RVQdDPDKOE/a1ZN4sGWxqjsyDozLHpHpTA/eJ4N7kSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVZ0cIeS8Bc0ZTqWGAOEOu0rEb9TnJMfrgQMlwioLrLnCj0W4zGFYwbSDws6iftI4 9tkkpJFF6T8TkqXDsxmWctxeQANSp9vgw/FcKgVWVcrAxL+wr0Ze4uJzbF/zPzxL0Y iGctFNPefA6/e0rwSa3N2ad6iJQOjhQ+68S//ZYQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tsuchiya Yuto , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.16 0123/1039] media: atomisp: fix inverted logic in buffers_needed() Date: Mon, 24 Jan 2022 19:31:52 +0100 Message-Id: <20220124184129.280692917@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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: Tsuchiya Yuto [ Upstream commit e1921cd14640f0f4d1fad5eb8e448c58a536415d ] When config.mode is IA_CSS_INPUT_MODE_BUFFERED_SENSOR, it rather needs buffers. Fix it by inverting the return value. Fixes: 3c0538fbad9f ("media: atomisp: get rid of most checks for ISP2401 version") Signed-off-by: Tsuchiya Yuto Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c index 75489f7d75eec..483d40a467c74 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c @@ -374,17 +374,17 @@ static bool buffers_needed(struct ia_css_pipe *pipe) { if (!IS_ISP2401) { if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) - return false; - else return true; + else + return false; } if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR || pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG || pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS) - return false; + return true; - return true; + return false; } int -- 2.34.1