Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9441667pxu; Mon, 28 Dec 2020 16:41:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpTx/ttxlKF3YDeBWS2JfpjuoxzICvTpMnOPnocxhD8gCK5cRGj68ztR6/lh4ypOgQLRX3 X-Received: by 2002:a17:906:e58:: with SMTP id q24mr43822109eji.438.1609202462290; Mon, 28 Dec 2020 16:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609202462; cv=none; d=google.com; s=arc-20160816; b=TFfV9E3acuf0ZUwYgEPHSd+5eEsnqkomY185VDZyeN/Iubz6EgsFNILQmziMtswrbJ 3Zk9hMo61b47tnPLyGfZzJQ3W2I+xSpU1uwl2dNiFg52oNO0mA9cVHiiI1hIZFEIYt5b GrjLj4bOerYj1If1CP1fk84OL0SWrIu0AdUHUalcyeo3alvBFbexQMPegmBQsbU4vgzb Skli9vyRUiUKJNKIVPsoW6RsliSBiQVYpwhLlctijSYlDk99/urV3qyaZIiBenORsMUD szFojs0OwaLzupqy8hC/2AsGbMGXNJigdQZT4c7DkvhV19pcNO/I7WGzHtpqWFB3hh9f 5YmA== 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=nPnH80455G6t2uh4G0+mBkxdN+DkQEKbWX/TFS6HofY=; b=ebdPmNpmPuJreJ+Fuwu85+avW/MHcsLIMIJq8W2MeHghBhKrWw7Qe/a2Gi67z2YvuC E11tdUmiJlwu9+0VwJptrL4O8DTJTv6DF/LoEJWl6AJRlDAaa0EW/GptKz4q01Q1bamx 4poG5DrKqtonDd2KKSOkQBDAcjY+d7jb6eT+6PNfa2FgUnkZ/8KDZwzecVgquZTZPmwa vYFR337YUFqKW0D2rdVgfAicP5Ki8+XotVbfSAOZQ3PbGJe1UCyy9ZxgceP9EjIxcUTt Sv8lhGi58viRkcSgVECk4YgaxuNtLSSrmrxkcp6+YSlKBAla8OzOiwzblz/v0Wt0jAnx LnpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qVBXzUpR; 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 e21si20508792edv.260.2020.12.28.16.40.40; Mon, 28 Dec 2020 16:41: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=qVBXzUpR; 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 S2387811AbgL1QAE (ORCPT + 99 others); Mon, 28 Dec 2020 11:00:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:33108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387725AbgL1Ncd (ORCPT ); Mon, 28 Dec 2020 08:32:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F33D22B3B; Mon, 28 Dec 2020 13:31:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162313; bh=MkFCPVl2+XONaex4z1Q5d2HwvZ9DHyQFCJMDiNMRzTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qVBXzUpRaRWAc8VBALT4dSJ58QzDjVn+5or6y4Vfa+owVk1kQCTM/vKJNt6Nz/F3Z iLMnuDsv2cRlZDRDuYdlGxXdMKFUBhik0PrY5vzg7A57xTK2ZfJNkkW3KUykwjRCrk wQVl5xCk+GOKUhaDThJUHUupnTOkvKDX36lawzUc= 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 4.19 261/346] media: ipu3-cio2: Remove traces of returned buffers Date: Mon, 28 Dec 2020 13:49:40 +0100 Message-Id: <20201228124932.392752928@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 @@ -801,6 +801,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; } } }