{"id":2223941,"url":"http://patchwork.ozlabs.org/api/patches/2223941/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260416-mipi-v1-1-9c027175abdf@gmail.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/projects/21/?format=json","name":"Linux Tegra Development","link_name":"linux-tegra","list_id":"linux-tegra.vger.kernel.org","list_email":"linux-tegra@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260416-mipi-v1-1-9c027175abdf@gmail.com>","list_archive_url":null,"date":"2026-04-16T12:09:29","name":"gpu: host1x: mipi: Fix device_node reference leak in tegra_mipi_request()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"85cdde19fe89d922b13534c27db9e117eb087abb","submitter":{"id":92491,"url":"http://patchwork.ozlabs.org/api/people/92491/?format=json","name":"Felix Gu","email":"ustc.gu@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260416-mipi-v1-1-9c027175abdf@gmail.com/mbox/","series":[{"id":500145,"url":"http://patchwork.ozlabs.org/api/series/500145/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=500145","date":"2026-04-16T12:09:29","name":"gpu: host1x: mipi: Fix device_node reference leak in tegra_mipi_request()","version":1,"mbox":"http://patchwork.ozlabs.org/series/500145/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2223941/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223941/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-tegra+bounces-13774-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cplZMRIY;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13774-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"cplZMRIY\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.215.172","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxH4j0N6rz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 22:14:29 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 9EF3C301667A\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 12:09:36 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BE3713A8750;\n\tThu, 16 Apr 2026 12:09:35 +0000 (UTC)","from mail-pg1-f172.google.com (mail-pg1-f172.google.com\n [209.85.215.172])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 955B737C907\n\tfor <linux-tegra@vger.kernel.org>; Thu, 16 Apr 2026 12:09:33 +0000 (UTC)","by mail-pg1-f172.google.com with SMTP id\n 41be03b00d2f7-c79662668bbso261539a12.1\n        for <linux-tegra@vger.kernel.org>;\n Thu, 16 Apr 2026 05:09:33 -0700 (PDT)","from junjungu-PC.localdomain ([223.167.147.125])\n        by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c79581d6341sm4245089a12.30.2026.04.16.05.09.30\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 16 Apr 2026 05:09:32 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776341375; cv=none;\n b=hH63m3UG3Kn7Ra2+DqGD9ab0HuQNLxhGbUtaSPJc/4x9IqOgOBKcqd8q80qlTsb4KrcFCZ/I13aRXe5b2Fu+QN5W9cV1pIrWxWYC80STza57Sd0QFWCZz6O9bV5NnxdYHWy2quneKcCVUx0rXPKAN2GCBMQcqqGSwXDLmYYYY7k=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776341375; c=relaxed/simple;\n\tbh=knUH34kPAdl0Glqyp0IYrLw7Xc3rugSSyGH/rGCenqQ=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;\n b=Kgj8ZjoQaUs1L/B5TpzmeueLeK1eMwskk1zoIMxW2+J4zWmp40X2NtlFFmjjA8NkLN65IRMjCbhW74XnKR+8rQ4XwEtE66mavq5B6tNfe92Iv4gyEaXVNRHhGWJex2+Nr044EVmNdF/dx/U67mtBJUWiO7lg0QqarzwI5gTVA7o=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=cplZMRIY; arc=none smtp.client-ip=209.85.215.172","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776341373; x=1776946173;\n darn=vger.kernel.org;\n        h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n         :date:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=8l44xHaLOx+xTMPQRoRD77brBCTj78T5PJ1Dys9zxMU=;\n        b=cplZMRIYnZWgs5WYg4ul6/69W6whZand3yF8bYY8pa28BQoXh4e8RacslSjzMlZTH9\n         uawGXarkqfJ+ql/L19r1b3GXQQySryFHlKR9++AzBHKTur/vf3Hi1ctr1ABfvr9Ak21r\n         xNAaGz/cHhbi6+9gJplvuseVMNTWX1nSCUHIJ5T/DLVSfUsDTRXV6bfXxK+i6BXHcR7r\n         JTUrsJ/U+Z2MtoSWPe0g4ASkoayUqcHBygC+m7yc93gYklmhsf0al0RbOi/4O2JY4pkA\n         7DrQh5zit//f5u1keH1ZzedtGghwPMbfIE8Iyrv/8IDReNG73fvsb106MiEu4h7xBWkp\n         K77A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776341373; x=1776946173;\n        h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n         :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=8l44xHaLOx+xTMPQRoRD77brBCTj78T5PJ1Dys9zxMU=;\n        b=sItDE3KC4fcDDhinV9+QWC68BK7o3Ra/PlWaHgpTIhwTQhH+9qUTriCchIpd339U6A\n         bZ0Ms0rtSGduQReDit8KP5DVGvi30QIhKp9ycec+mzMHvJIaAr2cDIqMVMr+s8zxwOCl\n         A6GMJEHzVcSH+NJYqtB0Xx59D6zgw2h3382tmpA1GZngBQX+RgugUq5CfCStfXv3YmWi\n         iPlZlfy5L2orU+W5PEG79gp7n6sVuYc0ufx6vnUdMPRf84gqSBkTQOvyH4OBEH9N9aqE\n         2X9+lVOvNr8xHsb7UERLVvZXKtr4wwGdzb7kLqwl9Uzi0uowMj8xMOLCx5nEB2BUVOLI\n         6V3g==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9runM0pXJUK03R0Kid1IfOFLuKaDg9D8DKdjdfVmvLIQsD7rImbkOM4hFto4mCScqX3NkxxVvOqqXkGQ==@vger.kernel.org","X-Gm-Message-State":"AOJu0Yx7h7W/mPKhXSyiDjPf0S9zvsF8H0EyEkl75vMut532YFDmBzb+\n\t2E32ixayqqYd900Sybol478fPq3YnDCqNk69yqpu60otCHHGU+fsiMxs","X-Gm-Gg":"AeBDieu3A0uUzDgLWJ3bwII45k0YuJv1XtPGatmQ/GzKc6E3yG1C/aZwc5s3uW8rMze\n\tzFAvAjbKT/51hVmzozg5g5LH91M7Jof6YI7vR5/NxxksO9xFOS8KG/tMKV7GJjHOyKnvj/ffvqR\n\tTbLkTTuNrncZxn7YoUZlu5HBNAhKz8l33r69vlmzlmeuQuP3mHY4UHcEsEaIWYm5yWhhyMct7cE\n\tVFTke05dMeSDSMjylKocnGGnNslWAvT/5nkOupFQm/pXNMyAnr/7RYzVcVrqwAn28KGLSlhjiSx\n\tMkuQTREbcCTw20ZFXqY0r466xnRa1KXF6YN+F156Mt2+JWlbY9kn6hUE3z7GhdbDBJ0GXbmVPkC\n\tLRZr7op6K9CbtDAIBI76+yNrzE4gkno3eHoOhubo++AfxB66gnuowosGSP2njyOqqI80YOINq4z\n\tNXp/QqlLUx01cTSK9LTkiqohkkNenCAN0gwkiBX+LS9xVRJSz6q8lqDy50Okmm5eIP8JmXDL3Vg\n\t6qWygn2P3BZiEVvadcsRyCCyzfaDS4=","X-Received":"by 2002:a05:6300:6b08:b0:3a0:129a:973f with SMTP id\n adf61e73a8af0-3a0129a9ae6mr15918942637.52.1776341372798;\n        Thu, 16 Apr 2026 05:09:32 -0700 (PDT)","From":"Felix Gu <ustc.gu@gmail.com>","Date":"Thu, 16 Apr 2026 20:09:29 +0800","Subject":"[PATCH] gpu: host1x: mipi: Fix device_node reference leak in\n tegra_mipi_request()","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260416-mipi-v1-1-9c027175abdf@gmail.com>","X-B4-Tracking":"v=1; b=H4sIAHjR4GkC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n vPSU3UzU4B8JSMDIzMDE0Mz3dzMgkxdi5S0JOPkZDMT81QTJaDSgqLUtMwKsDHRsbW1ALbbWvN\n WAAAA","X-Change-ID":"20260416-mipi-8dfb3cc647e4","To":"Thierry Reding <thierry.reding@kernel.org>,\n Mikko Perttunen <mperttunen@nvidia.com>, David Airlie <airlied@gmail.com>,\n Simona Vetter <simona@ffwll.ch>,\n Sowjanya Komatineni <skomatineni@nvidia.com>","Cc":"Thierry Reding <treding@nvidia.com>, dri-devel@lists.freedesktop.org,\n linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,\n Felix Gu <ustc.gu@gmail.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=ed25519-sha256; t=1776341371; l=1103;\n i=ustc.gu@gmail.com; h=from:subject:message-id;\n bh=knUH34kPAdl0Glqyp0IYrLw7Xc3rugSSyGH/rGCenqQ=;\n b=ufNI0wiXlc4OTOmmF0jxOLfRsiv8Bi35YYGkHIae5wkX/CW+StNB3w6KThINmGtHYzUbUOplE\n oltVs94d89BCzlnacTuP+TWPLL1gsEx0ZPZM0QE7qiWj8nQ0EB6728V","X-Developer-Key":"i=ustc.gu@gmail.com; a=ed25519;\n pk=fjUXwmjchVN7Ja6KGP55IXOzFeCl9edaHoQIEUA+/hw="},"content":"In tegra_mipi_request(), when provider.np is not equal with args.np, it\nreturns without calling of_node_put(args.np), causing a reference leak.\n\nConvert to use the existing goto out pattern to ensure proper cleanup.\n\nFixes: 767598d447aa (\"gpu: host1x: mipi: Update tegra_mipi_request() to be node based\")\nSigned-off-by: Felix Gu <ustc.gu@gmail.com>\n---\n drivers/gpu/host1x/mipi.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\n\n---\nbase-commit: 936c21068d7ade00325e40d82bfd2f3f29d9f659\nchange-id: 20260416-mipi-8dfb3cc647e4\n\nBest regards,","diff":"diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c\nindex 01513b775d89..988681423981 100644\n--- a/drivers/gpu/host1x/mipi.c\n+++ b/drivers/gpu/host1x/mipi.c\n@@ -114,8 +114,10 @@ struct tegra_mipi_device *tegra_mipi_request(struct device *device,\n \tif (err < 0)\n \t\treturn ERR_PTR(err);\n \n-\tif (provider.np != args.np)\n-\t\treturn ERR_PTR(-ENODEV);\n+\tif (provider.np != args.np) {\n+\t\terr = -ENODEV;\n+\t\tgoto out;\n+\t}\n \n \tmipidev = kzalloc_obj(*mipidev);\n \tif (!mipidev) {\n","prefixes":[]}