From nobody Sun Jul 26 00:20:44 2026 Received: from cvsmtppost104.wmail.worksmobile.com (cvsmtppost104.wmail.worksmobile.com [125.209.209.17]) (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 E2054372EEF for ; Fri, 10 Jul 2026 20:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=125.209.209.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783716639; cv=none; b=b5yS52DOS+ti/AjWuD0l0EbBopmgxxV38EJ1iOqAsTAMA6T3j9YbTzf414s218kV3zD7xG05g93uo5zc8VM94kCAcxidgH3sOPcmUBfiOvUjYJWV60qxbJsaAoOVw4PjOOuzJJHXizvLpyy5T9Y4cYmBSxp/eJ87eb0CnNMRkU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783716639; c=relaxed/simple; bh=u04zFavuYLvwHTm35ic5NAbzjGnp0TqATPQNqu4zp1s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=q79Dk5pGN22WKXlcJcO3A5BGthgkPi4+ethAF/t/r9qh0eh+dXEyS23J4+goGs3ySamewkKdWO69/36h6IungduUc6Hi5oRuD9VRsTot5DSq1wzONZYfTpdnmqzLR9uRntFogmCZCAO5gaox48/2v7f6IBRc9cYR6ohpzQjgQYM= 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=DCbJuL2k; dkim=pass (1024-bit key) header.d=korea.ac.kr header.i=@korea.ac.kr header.b=VZ02bPB+; arc=none smtp.client-ip=125.209.209.17 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="DCbJuL2k"; dkim=pass (1024-bit key) header.d=korea.ac.kr header.i=@korea.ac.kr header.b="VZ02bPB+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=worksmobile.com; s=s20171120; t=1783715419; bh=u04zFavuYLvwHTm35ic5NAbzjGnp0TqATPQNqu4zp1s=; h=From:To:Subject:Date:Message-Id:From:Subject:Feedback-ID: X-Works-Security; b=DCbJuL2kyifsB8VHhQeeowvSNCIoljNueeYLB66cZDgx0lGZ4+gTPLd4w1ynoqzrH lAGn7kz0wWy2Mi3fH2sb2zmjQilr/XQTvL8eoYg1vRZ+77HFwRWglg6GTf60MmKsZc ATUrP7POriBNilvGwlOUo8MNS79NQVQATorqcof1MroY+TrwGr8DiWnA5ddTU6NQob Fx4Cw+X3RjAvRCYbY4WZS3VP+9dy3lVGkMW7QkuM2S0Wv85dY3TjUB7yV88auRyyaC 60VdImm7KeY5M6fALl6j3K41KWN3ptKXS5uIXF4SGkg66Opn3sbnfRgSqRG6CVKp9r Nsdhl0nhQ91oQ== Received: from cvsendbo001.wmail ([10.113.20.163]) by cvsmtppost104.wmail.worksmobile.com with ESMTP id 1mXRwEBRQlGLTFUdstEbJA for ; Fri, 10 Jul 2026 20:30:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=korea.ac.kr; s=naverworks; t=1783715419; bh=u04zFavuYLvwHTm35ic5NAbzjGnp0TqATPQNqu4zp1s=; h=From:To:Subject:Date:Message-Id:From:Subject:Feedback-ID: X-Works-Security; b=VZ02bPB+MW+9x09dprEHbgoycRxIRNAskpTw5Nw3qlYBBnMnLrJYZZo8aQH3Xf7E3 Wdl2WvDxkqGCfNU9Mq2XfUcsJvwkYtwFuA0Jaij+Gbx2mKH88oIspRkUEC35Z43Ynu CobeTmc5ErHzvqqnzSIdBNDg3AjWSzF+tX6y+Ee8= X-Session-ID: CvxIstBYSTqLhD9WR40Ghg X-Works-Send-Opt: 5Yn/KqgmKAKmKAFYFqMXKAK/FqMXjAumKAgmKxEmFxudKoMqKNmmjACYKxb9Fob/FxMqFNwYjAg= X-Works-Smtp-Source: IZK/FoK/FqJZ+Hm/Kxgq+6E= Received: from s2lab05.. ([163.152.163.130]) by jvnsmtp401.gwmail.worksmobile.com with ESMTP id CvxIstBYSTqLhD9WR40Ghg for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 10 Jul 2026 20:30:18 -0000 From: Jang Ingyu To: Mehdi Djait , Michael Riesch , Mauro Carvalho Chehab , Heiko Stuebner Cc: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: rockchip: rkcif: Use IS_ERR() check for media_entity_remote_source_pad_unique() Date: Sat, 11 Jul 2026 05:30:16 +0900 Message-Id: <20260710203016.2250058-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" From: Ingyu Jang 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 --- drivers/media/platform/rockchip/rkcif/rkcif-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c b/drivers= /media/platform/rockchip/rkcif/rkcif-stream.c index 3130d420ad559..542aa877919df 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c @@ -466,7 +466,7 @@ static int rkcif_stream_link_validate(struct media_link= *link) struct rkcif_stream *stream =3D to_rkcif_stream(vdev); int ret =3D -EINVAL; =20 - if (!media_entity_remote_source_pad_unique(link->sink->entity)) + if (IS_ERR(media_entity_remote_source_pad_unique(link->sink->entity))) return -ENOTCONN; =20 sd =3D media_entity_to_v4l2_subdev(link->source->entity); --=20 2.34.1