From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A9AD3C09F4 for ; Tue, 30 Jun 2026 09:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782813302; cv=none; b=inZsiPExiRwpmObqTfaiUIUCpA6+b0uWcfGX4Ee5Z8YqwQ/N1d65bpfieS0Vb/SCbmZrCyPFwvX50U6j00r2932Gu/xMhJ6JZuqjYNLuB+iBO1Z/5mIGVJcZPL//2k5SlhbGS8v1aYO56dUSL+x+r6hviLkynnWT3T0RrQ83atI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782813302; c=relaxed/simple; bh=T8AFSyXrMAPyQstUVqXg9W8pfvh91+5v68zwfOY2gT0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cU1gUN78jv1rgVeuKzorR/SF4lq8dowGk1OerkYFLYFTG4anBEktx8hfb95Y4TXX3LAQkdHaZRgJOi0NICiKCqjT/xQFSRJvuS/Na31MEnNO+jUmnPLxc4YlJKAo46iTiB5vrm9GYcjj7SLWftvRigS9xSGvRSD4b3GA2Lvlfsc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QK9lhknu; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QK9lhknu" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-8423f236418so2226190b3a.1 for ; Tue, 30 Jun 2026 02:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782813301; x=1783418101; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T8AFSyXrMAPyQstUVqXg9W8pfvh91+5v68zwfOY2gT0=; b=QK9lhknu15+C4KBNoz7PYVL8eqkxea4OOrkosU0y95csVCGkG/xCmtkqUiCs1+sdrM OdXtFn3GIOzcpT4etLeIR9cM+PX94bRL9KBEs+mO5khXWljrvS3a258sd6Dy+r8z2372 C7SsvWywytCFN68TTrdGt1Sx5ZeB6yEAsMQgrATRcaFqsd8sOOgVHo1DkdVMzX1oO8Wt QQvkSrq2FOGVnX5E8sDkFrOk/pULDjyYVyHyVkWinINYZBQ65Ol5Dh+um5AEoYd6fXlt FAi/d1DW1KTly+/j/18l+Rbcd12HR7Anwaezt6xow25Tud+KFue4WJOgmPg1CsxjL4OF Qv+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782813301; x=1783418101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=T8AFSyXrMAPyQstUVqXg9W8pfvh91+5v68zwfOY2gT0=; b=OSz7hL7OhCg4cBImmNKm/x/RcNWIUkcz9qCPyRBdbMaHhFr0/HHeWm5yDScpCfcdWF Os35jJ9YXkdfp8pmB99nKdcBd/lyMFAIXS8P5zX4uvfCY1N7aU45Tl7s4R26HlFrtHX/ utnPkOciqq7mDwqgqWcBSlmht1LQH/oMheQKNceAqLfV2RdPqi6mLaYe+CK/rqdxlEkM 9WhPgNcDzoivsU9y4+HImA7Ygnkf4J5nGCF9zQpPkRQyXmjaK4C7QlkrdKU3MhXKgGwo 1yx/UKobFPp67G7cRy7o0bPkgk12Wjoy6cExOF01GgpHKWUscSkQTajvkTz/JnjclmCD xpRw== X-Forwarded-Encrypted: i=1; AHgh+RrOFHbvOidl37SxUJNbtgyEfPJuDmmtyNmw9K9+VRoKkLNJzIxpHcO38c8tFzfXM1ALKDbdYNr8hY0dBag=@vger.kernel.org X-Gm-Message-State: AOJu0YzMd7QvEiYYoQXguC8/V+2VLLDEVYbIFfOK/+8SWcw/SNFIiVwP buTRDN9P3GKSARcjJXqSj+TAGwITtImt1z6QZPRvfC1Bm9KDFMReygzS X-Gm-Gg: AfdE7clBq1QQQroCl3GJNhoUkrP/nQFLHp1JQAUHQRyBrOgTc0NUVuQcDED5Mz3b1vp c3IGv4WWgjpD3wGQiw6HUKpO38GqmpTRQjM2PlhkLqT+y9w80V951LVw8ethTkqCkP0AxrjGsew s5cyY0B8j3nzmbQX7zRt4MzR99I2Tg3Egr96O2sQ7PwhttLExt5fUNV2QbDJp7v4jbjnzTlW/1Y ITO/MyKDfJNtfcL3xrTQ4AGYeH8MbtF2rcCbLZqNKGEIbUntKMp2RdORrpW7gYF5IjRedSMIXP9 C/sd5/73wjZe98I3i0oy5MargBjk04ANSHv1ZNNaFYL7BCQPh510HesZdhM8VaNyeHB/zI3483c 4tbDW62FQP1XKPVj2xm2VuL5f0sgmACWgwX4Q/2fx0/hv0bOfbo1kpnoNEObqaC55sVAZhKKUAI TR+QZ5cwLSZwCllvzRJ2rkF6EShRwvfQBWwrZJ+MYpXIYfmgicndflp4dRRmP7ibSfYfRbvGqQj DjXSvEY38bBxo2zdf3vUVQ= X-Received: by 2002:a05:6a00:1253:b0:845:e1a3:107e with SMTP id d2e1a72fcca58-8479f27a8d4mr2243277b3a.52.1782813300635; Tue, 30 Jun 2026 02:55:00 -0700 (PDT) Received: from fourcolor-Home.. (2001-b011-7010-d7cf-1ecc-f3e6-c652-23d3.dynamic-ip6.hinet.net. [2001:b011:7010:d7cf:1ecc:f3e6:c652:23d3]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8479ff8b80esm1563495b3a.6.2026.06.30.02.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2026 02:55:00 -0700 (PDT) From: Shih-Sheng Yang To: laurent.pinchart@ideasonboard.com Cc: hverkuil+cisco@kernel.org, kees@kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, yshihsheng@gmail.com Subject: Re: [PATCH] media: v4l2-dev: fix media controller registration error handling Date: Tue, 30 Jun 2026 17:54:56 +0800 Message-Id: <20260630095456.1745545-1-yshihsheng@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260626192257.GA2894880@killaraus.ideasonboard.com> References: <20260626192257.GA2894880@killaraus.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Laurent, Thank you for the review. I've addressed this in v2 by moving the NULL check into media_devnode_remove() and by using device_unregister() in __video_register_device(), as device_register() has already succeeded there. I also checked the other media_devnode_remove() callers. I didn't find another caller with the same failure pattern or an immediate risk that requires changing the helper API. Since changing media_devnode_remove() to take a pointer-to-pointer would affect a wider set of callers, I have left that out of v2. I can add it if you prefer. Regards, Shih-Sheng