Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9106632pxu; Mon, 28 Dec 2020 06:48:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyG1VUaLkKwv/qq17DWH1DPdhlpRQUtg1jDvfnbW0afGVCtptiT8wMcFNnfzI1o3LWmataa X-Received: by 2002:a50:f0dc:: with SMTP id a28mr42908638edm.291.1609166920571; Mon, 28 Dec 2020 06:48:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166920; cv=none; d=google.com; s=arc-20160816; b=Grr2mf93EWG2o2e1KzNvtB3qG+wwG9MP3/gS1H92nIZRgDeF43GX5LHwL67XgMcTd4 qizwz482BkntnAv/6NBv/wSaJ81xco/lnxw+iv9GaJ8Ye1+xEcX3yx0VLXSlVjiuijpd kLv2QS1Tk+P0rxvYQLf2La+AoSDLdvQBMbbqdJlRaEgJ2361O8odkM+8wyS6ScH05sq+ wGXyzHDtHNG8jB5ZOy4WKq5WgqiFfr9xRIAvlwd6xCzvf5KsB24ocllrH1YH+jWNALN5 8JPy8zfAiJ1dbRtr6F/kpZNzopCnGVnbBy7QVysVNuoFdR8OXsRuxR7agJJSo8hczEwZ S5Ww== 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=/SOp/0TsuNpG5qPMe59Ad05AyCVZAAZ+6ZP1e6NuUoA=; b=e2X3ArkvOu41zm1yoAoPZqQNdWSMzpwcyUy3mhKf0Q2PjtZ7AVweXXKW7irCJPozdo b8u3DAWmcstgzuhbt/L9lEOKUYUh/yylawTKxJS/q2arElOCG5CUbRyMOv4gf0pKHgEp bXKlXmQdybuXvrbVbwGXy+JxGE6s9dxsmQcShnWpX0dVvSpMU6WKQmfgb9Ou1sjUDhJp 77G4hMbIKqHdXdg808OmhJnVF31K0Y8qpqOkFAPQV1GSQkZNAECKwP+WdsLxiYKEyDZv QC6Eyk8gQTznkZivyYigwJDJgVHkJ0/rJBxKgxzAbbQmxcxt3NtuwCaSTooO6+Z343Dt jnSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oFSPXrka; 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 v18si20028304ejj.255.2020.12.28.06.48.16; Mon, 28 Dec 2020 06:48:40 -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=oFSPXrka; 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 S2502958AbgL1OYA (ORCPT + 99 others); Mon, 28 Dec 2020 09:24:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:59646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502923AbgL1OXu (ORCPT ); Mon, 28 Dec 2020 09:23:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2111229C5; Mon, 28 Dec 2020 14:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165415; bh=Rj1m7vnH1+Avc/wyv1ixCXQSgP2BE6bZljsD3dh4mTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oFSPXrkaE3qBfToIZp3Y5RKqG4MacE3AJvwkV7nXLMilPBgZmdWcLcC2d1d2on+so nf6nJZJQfOWC8jwLtMA1vbyFuEXMByaJzF0lq391cKUjlHLjsYq5W6AKxMwNvGMyIa iimSE6Y0EjaFnbbm0h4EFLLkNc0yOmMWZed6LuD8= 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.10 524/717] media: ipu3-cio2: Remove traces of returned buffers Date: Mon, 28 Dec 2020 13:48:42 +0100 Message-Id: <20201228125046.074691249@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -791,6 +791,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; } } }