Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3066416pxj; Mon, 14 Jun 2021 13:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG5F5LZNjXmMeLEgm9ZF8Zwu9IxZjHeE5Waq3LXFq8HirWx4E+BgJuKUPu5wlyKb9KzrDP X-Received: by 2002:a17:906:2c4a:: with SMTP id f10mr16744733ejh.493.1623703036124; Mon, 14 Jun 2021 13:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623703036; cv=none; d=google.com; s=arc-20160816; b=qKiifp9wbujQ+6SjSYyJZ2ipaeP4zpbXtqnhflziO0y0/TRFVPCiJhSh+98jjo6HTy F2CWAQu2JGNlqw42RP2eaAAQzef9cOJKV/RhoQBsqp4jzKwNhIphjNQx+aWQrZDkVSwF nDzruoikLZiaPvYg6YO8Uz9dWnE+sKCrXIehY1p0kn4h5NzSHEqZv/FjeQ4YVGqWm7kd tEb7xAPZhsWrNHQE0VT/bbMTfV9ECs88TTx9aPzoKnBG7eiko1qQmqUQg8iKoRWVesx0 GHGcfO5beR5lVnxbsqRFyVcsb4WMLF1uVD/3cdH8LZs+PSjiwyEHtrU6oAthawXv3VB7 oTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Yc6wyMPYhdWdq0/Kpm3Gi2X4UChfhwDI0BdhXHdgw2Q=; b=OkWnXAg4HogM2+6dykUtuenjoXbaFSufRY87tjoZEny1pIWyzI7hSQv9giJsGKN4eI U6b2kRP07drBpBQ7pMdU7vmpZ5YoOnbPiHRXuoDNp3VQodtPOV+n4eM3NcdcPRVPrOkp FMlzXWZRdVg3glaNl74pQXS4PYIcQr4Id+GPlMfYqq+eGpW3jswgcfmPNA8IHQPUK9wt qviffBgRzBAkqBPSgvtZcQx+bxQ2vMQ9EpG9YfWKzzL6KTgYiC3iLbheOruNoOM7n+ZZ XnRahCtA3J/LEJVKcR25z0xtBGpUyebSXLZKMBZRJmTg+aPJVVKw30uFeT6efa8J8hBN PeQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ka11si13033043ejc.367.2021.06.14.13.36.53; Mon, 14 Jun 2021 13:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235114AbhFNUfq (ORCPT + 99 others); Mon, 14 Jun 2021 16:35:46 -0400 Received: from fgw21-7.mail.saunalahti.fi ([62.142.5.82]:51579 "EHLO fgw21-7.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233352AbhFNUfo (ORCPT ); Mon, 14 Jun 2021 16:35:44 -0400 Received: from localhost (88-115-248-186.elisa-laajakaista.fi [88.115.248.186]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id c5062c0b-cd4f-11eb-9eb8-005056bdd08f; Mon, 14 Jun 2021 23:33:26 +0300 (EEST) From: Andy Shevchenko To: Prashant Malani , linux-kernel@vger.kernel.org Cc: Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Andy Shevchenko Subject: [PATCH v1 1/1] platform/chrome: cros_ec_typec: Put fwnode in error case during ->probe() Date: Mon, 14 Jun 2021 23:33:10 +0300 Message-Id: <20210614203310.339541-1-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org device_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: fdc6b21e2444 ("platform/chrome: Add Type C connector class driver") Cc: Prashant Malani Signed-off-by: Andy Shevchenko --- drivers/platform/chrome/cros_ec_typec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index 27c068c4c38d..fb03c22fa34d 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -375,6 +375,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec) return 0; unregister_ports: + fwnode_handle_put(fwnode); cros_unregister_ports(typec); return ret; } -- 2.32.0