Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9434802pxu; Mon, 28 Dec 2020 16:26:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDcJnWkWuygxQepup28wXFYtYFhZndkeOkAfUZuA/YogYSerlWDX8PWn9fEiiiu8urpGRM X-Received: by 2002:a17:906:a181:: with SMTP id s1mr44743825ejy.60.1609201562242; Mon, 28 Dec 2020 16:26:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609201562; cv=none; d=google.com; s=arc-20160816; b=fFv/uT74Lte2LYIbaP4Yj2NL/PMv0+udBvBWfaxWhvTAFbPqZqjp/M0wYeQ9nH0wic ZKLUc8V8boM2jC7ex6IXJwlLHh1QjIpn4jWBRM3zy3KAIvsZxiQpM9kogZpl445loO/I enKCDvEw600VSE1yTo/worzdUCfe/szg6LstJIKH4ffVfsA10SIFrfnG87oavLd2DrCx RfZxSSkkg6VDskFBrvhNwF7LO2HvPehXHi8CY26Z2XNv8oaHSB2LOB9caYKKgpLSK4Ee GzmBxOd/TercPQXWA04Sy8rWZTKcivFIAWREigy1K5yfjHL7mkUrICiAtWSdl9n9QBua Mvjw== 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=eVPZ9c+krqwTaJgTXIJCnFSU4WlOrqCS+z6n+S7auVY=; b=opAtzOgY2EMCbvBBjq/bvq90zr7JDfdMG28XCvksvQm0cBtBNg6G0IFCrNWEOkm7VD iuRrRAsJHqcqohhYjivafn7N52Uuv9AZJLKbruF20PzJNnVTNJrP5DUWloxFudv9naX1 EzOIyNuMPB7o8KPOTI+oP9N4iYKV8Db6NADxY6URZd9WcC2PixOAOY7dO5WbUKfeeIIX Ei3S8LVJbaZqsPdPKEQwho0Btups/AZpi322F4+WZPwzzO+o1FIGYkoVKkDifm6/f/X3 gbca1ROy8zFCOZ/Kwp+xL5aiRSUcN4/4wOI3zz8GDk/lu/fasQypaLGfiVQWWnEJcmQ1 ZZ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L3F+sq7e; 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 b16si6098045edd.351.2020.12.28.16.25.39; Mon, 28 Dec 2020 16:26:02 -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=L3F+sq7e; 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 S2408626AbgL1PfW (ORCPT + 99 others); Mon, 28 Dec 2020 10:35:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:55016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407260AbgL1NxJ (ORCPT ); Mon, 28 Dec 2020 08:53:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F99B2078D; Mon, 28 Dec 2020 13:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163549; bh=z+XlOehCvNsUqzGQ2Rv/7OCrXSImv7/79uw5cQeuxMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L3F+sq7ekdcjMqxFOhbRyVCWC0OVxtsr6AJwCOL/GHsp+NxsY0/ggRGgCmkxGCgFy /N88sRaQ877I2xGYo6f4C+NEr5ep+6N4cR9hYljXMDJNPLHFuCniEAYz+bFDPY1u8T vwXMdd4MS3xXqRbz7ol+e9lYJujj8XMC7vi75iAc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sakari Ailus , Andy Shevchenko , Laurent Pinchart , Mauro Carvalho Chehab Subject: [PATCH 5.4 324/453] media: ipu3-cio2: Remove traces of returned buffers Date: Mon, 28 Dec 2020 13:49:20 +0100 Message-Id: <20201228124952.800058190@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124937.240114599@linuxfoundation.org> References: <20201228124937.240114599@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: Sakari Ailus commit 61e7f892b5ee1dd10ea8bff805f3c3fe6e535959 upstream. If starting a video buffer queue fails, the buffers are returned to videobuf2. Remove the reference to the buffer from the driver's queue as well. Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org # v4.16 and up Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -799,6 +799,7 @@ static void cio2_vb2_return_all_buffers( atomic_dec(&q->bufs_queued); vb2_buffer_done(&q->bufs[i]->vbb.vb2_buf, state); + q->bufs[i] = NULL; } } }