From nobody Fri Jun 12 12:48:49 2026 Received: from cvsmtppost105.wmail.worksmobile.com (cvsmtppost105.wmail.worksmobile.com [125.209.209.78]) (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 940263F4119 for ; Thu, 14 May 2026 19:31:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=125.209.209.78 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778787115; cv=none; b=ACm4Zvng47jFumzMoiGSEKK0QvmgocPbWUGo7X1jEpWd5OZeCajJvMP7N0HbPCTlqhc2NbpXRoNWqXMBk+J0R6Aj5vlBck4D7CKeyNkI25nO6nSBx1OsrPdlbGJMnvpxHgPGA1l+qaWVvOJuCk/foJ7ENcjAgLnDBKZ6mePakvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778787115; c=relaxed/simple; bh=BrkiWYlXRuwCbsC4kJBtE8pYjnIvwC1tTPopuZzeBaU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=OEOCFPXpCoN7HBaSC0/4O5rFEsZCa4eedyB/a0xLY8v9JXMhrdwWSritN6YmNjUEn7mcymkJnz7QQPeqXmHN17kWPKNKPBxZzSJ3lh2Z98+oaBoohs0c1pJ8H3Vf0n7EBAp48rglB2QtJuhWCxdl8sIgVKXJoUzHEmlfsg1rgV0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=korea.ac.kr; spf=pass smtp.mailfrom=korea.ac.kr; dkim=pass (2048-bit key) header.d=worksmobile.com header.i=@worksmobile.com header.b=UHTw4OSX; dkim=pass (1024-bit key) header.d=korea.ac.kr header.i=@korea.ac.kr header.b=LCU8KKmq; arc=none smtp.client-ip=125.209.209.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=korea.ac.kr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=korea.ac.kr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=worksmobile.com header.i=@worksmobile.com header.b="UHTw4OSX"; dkim=pass (1024-bit key) header.d=korea.ac.kr header.i=@korea.ac.kr header.b="LCU8KKmq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=worksmobile.com; s=s20171120; t=1778787110; bh=BrkiWYlXRuwCbsC4kJBtE8pYjnIvwC1tTPopuZzeBaU=; h=From:To:Subject:Date:Message-Id:From:Subject:Feedback-ID: X-Works-Security; b=UHTw4OSXVapxlj77y4OlnUMj4rXpn0G09GH/lGKK4o8bdVnTsHmSzbm40Ao/RpbpS 12GxKzXsdCTklN3UDrHjR+BhJdKc3s2HAre4P8usWqRQBr/Jd70RwJHLynBPHvsJzg vIwRrjg1AcqwuqOAKTFyqIpjfOeJwK2ot77BT4qR5BoJ4SEylFb6tYjd7iYW5CCn1R iQaQFQTkx5z9NxJrge4rs6pdkg7HFgNpPnfp8M+Fj0t9xO4aLDCjN0tV3qatTQlR15 Kgu0re7lr6XruD895cZtY7B//bw+ygS212yPVzuLhIuEmuH/1W188BYuKSLvCIsfvH 860oNKel8ocPA== Received: from cvsendbo001.wmail ([10.113.20.163]) by cvsmtppost105.wmail.worksmobile.com with ESMTP id 2Mz-z0SHSJyVH6xi0tEn7A for ; Thu, 14 May 2026 19:31:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=korea.ac.kr; s=naverworks; t=1778787110; bh=BrkiWYlXRuwCbsC4kJBtE8pYjnIvwC1tTPopuZzeBaU=; h=From:To:Subject:Date:Message-Id:From:Subject:Feedback-ID: X-Works-Security; b=LCU8KKmqmoYTh6J+D5j4cAsDUs56Zf13FubjdDTHtYp4fRB4QbceUUltdwFjTmAjm xQMibhLIV9T9KF+TfdfpbNxQkISEppCRK8zQhe3gBvj3ys3B3BRKxH+0FD4p358AVX nfkmdCmcaXQbY31DqBpHbkGDC7Buhl5ROBZmlN7w= X-Session-ID: kofb2z09QhisUCsQXLddww X-Works-Send-Opt: penljAIYjHm/FqM9FqJYFxMqFNwYjAg= X-Works-Smtp-Source: AZK9Fq2XFqJZ+HmmKxbd+6E= Received: from s2lab05.. ([163.152.163.130]) by jvnsmtp401.gwmail.worksmobile.com with ESMTP id kofb2z09QhisUCsQXLddww for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 14 May 2026 19:31:50 -0000 From: Ingyu Jang To: Tomi Valkeinen , Raspberry Pi Kernel Maintenance , Mauro Carvalho Chehab , Florian Fainelli Cc: Broadcom internal kernel review list , linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: rp1-cfe: Use IS_ERR() check for media_entity_remote_source_pad_unique() Date: Fri, 15 May 2026 04:31:48 +0900 Message-Id: <20260514193148.2357371-1-ingyujang25@korea.ac.kr> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" media_entity_remote_source_pad_unique() returns either a valid struct media_pad pointer or an error pointer (ERR_PTR(-ENOTUNIQ) or ERR_PTR(-ENOLINK)); it never returns NULL. The current NULL check therefore never triggers, and the "pad not connected" error path is unreachable. Replace the NULL check with an IS_ERR() check so the validation actually detects malformed media graphs. Signed-off-by: Ingyu Jang Reviewed-by: Dave Stevenson Reviewed-by: Jai Luthra --- drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c b/drivers/med= ia/platform/raspberrypi/rp1-cfe/cfe.c index 8375ed3e97b9f..91e9fa0341e06 100644 --- a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +++ b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c @@ -1779,7 +1779,7 @@ static int cfe_video_link_validate(struct media_link = *link) link->source->entity->name, link->source->index, link->sink->entity->name, link->sink->index); =20 - if (!media_entity_remote_source_pad_unique(link->sink->entity)) { + if (IS_ERR(media_entity_remote_source_pad_unique(link->sink->entity))) { cfe_err(cfe, "video node %s pad not connected\n", vd->name); return -ENOTCONN; } --=20 2.34.1