Received: from linuxtv.org (140-211-166-241-openstack.osuosl.org [140.211.166.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A64EA15E203 for ; Wed, 10 Apr 2024 13:15:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712754961; cv=none; b=X/24XWvmBRqQvTWtjFujgNEYUIT+WDTKjGE5dAIebdXcE0Ki39oDxSRe9stAK9ZxaTWj5bPB7mkK2JQhm7FyZ8SEn8mAFl4q58xJcvKxSBqKvzb6ag0/WU1e/7FEp1UDeTQaGLnHVS1DC/UbbbI4sZikOoKXmclDFvCHgtuk2g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712754961; c=relaxed/simple; bh=bM1BJggbzJDxbPrejO0zGg+Gmp3q7tYh5LSfAmJYjD8=; h=From:Date:Subject:To:Cc:Message-Id; b=ap5dGoFzgsTD2QQICKvHRxpFLYyL5GSru6tmGxRNmsPJOH9IoyvozlVnbsyNc7DoOr0160ekuKIs4+wm57ihEM06v0Vodio3a4r+IpWaH2vZDeCm081O9pTbh9u5u91lgjtyUB4/qTwdkiVWgwnkT8QhfrNZhMe/p+iXFodtBKA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl; spf=pass smtp.mailfrom=linuxtv.org; arc=none smtp.client-ip=140.211.166.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxtv.org Received: from hverkuil by linuxtv.org with local (Exim 4.96) (envelope-from ) id 1ruXnz-0001GR-0t; Wed, 10 Apr 2024 13:15:59 +0000 From: Hans Verkuil Date: Wed, 10 Apr 2024 13:15:30 +0000 Subject: [git:media_stage/master] media: v4l: async: Don't set notifier's V4L2 device if registering fails To: linuxtv-commits@linuxtv.org Cc: stable@vger.kernel.org, Sakari Ailus Mail-followup-to: linux-media@vger.kernel.org Forward-to: linux-media@vger.kernel.org Reply-to: linux-media@vger.kernel.org Message-Id: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This is an automatic generated email to let you know that the following patch were queued: Subject: media: v4l: async: Don't set notifier's V4L2 device if registering fails Author: Sakari Ailus Date: Fri Mar 8 15:07:45 2024 +0200 The V4L2 device used to be set when the notifier was registered but this has been moved to the notifier initialisation. Don't touch the V4L2 device if registration fails. Fixes: b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev in async notifier init") Cc: # for 6.6 and later Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil drivers/media/v4l2-core/v4l2-async.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 6a7dcf43d712..2ff35d5d60f2 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -620,16 +620,10 @@ err_unlock: int v4l2_async_nf_register(struct v4l2_async_notifier *notifier) { - int ret; - if (WARN_ON(!notifier->v4l2_dev == !notifier->sd)) return -EINVAL; - ret = __v4l2_async_nf_register(notifier); - if (ret) - notifier->v4l2_dev = NULL; - - return ret; + return __v4l2_async_nf_register(notifier); } EXPORT_SYMBOL(v4l2_async_nf_register);