Message ID | 1512555692-14439-1-git-send-email-lollivier@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 64D6560567 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 6 Dec 2017 10:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 531DF29C8C for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 6 Dec 2017 10:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47B5F29CA1; Wed, 6 Dec 2017 10:22:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A974129C8C for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 6 Dec 2017 10:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=oN2Hg1rAXW5FkFjlV+1QschdZpqzpIy5BCjIfPjCo8o=; b=VNR fPK4btCWvLV93YxKRuOtAakP5DNZFQmkABd7T8lFaMBCYzYArYYpySfydyLqLL7nUZ0j43ZL5Igq9 /VSTkEiAijEZjbwX5Z6kdmnMyovhTGyuFWKEVkqYjmIcrvoxa17rc/Wh0kvKFeK7QMOOUNOhWhgnl aPe1z/mgQGtXdk3nLV6qilxLLWLhG5JrzbnLcaaebtDB50zhijfhitbPYrWLs9LG9mrPmnPFcsiSN SQijy8S5DklFCjFwUTx+A4uFYFRGZ5zvLr+tzqdrrthoQd4pvS09Vn/LfFfljbscsabhErXKYFGFv 3xpXuust2WpEcf78FyNa4YW36Q9b8dg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMWqV-0001NI-9E; Wed, 06 Dec 2017 10:22:31 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMWqG-0000yc-Nw for linux-arm-kernel@lists.infradead.org; Wed, 06 Dec 2017 10:22:19 +0000 Received: by mail-wm0-x242.google.com with SMTP id l141so6246850wmg.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 06 Dec 2017 02:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=P+wuccCKA8VZFm12xJRmQjSldYWn9/QSyYoXD1qoTQQ=; b=gx1O2GgEPnHbDbfDOWKHyohXNLRlsE/uO/0ZmU0Gz+ekavVj/cPi2Zfd7s17HsH2rY y04HiYu5dMdon1XytAjfRrdVPpyp2fmuFCtpXr+xNJQPXVbXo+GI7hkZnWaPOomQM/ds ZJSLqy4CsJ5qjfBYdGJZnptgx7+MgLhBagAJ8504LgmIYcCfizpT0hWHNncdWXGEhsbu Y/m9gCYGvtSjKZdElkvdcIQK52qGQU6KSEWq29KYBcoyeU4mibMPF49I3x9qeJ7w7VXx AIsWpHAv2laSEarQzVDDvhUyf5SmsppMA9fEE61v/MV7x40aZ+LN9AR87kvO2GYJU6yV xMzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=P+wuccCKA8VZFm12xJRmQjSldYWn9/QSyYoXD1qoTQQ=; b=k/2iSK89T91oj2We4B8SOmZ7gcrEWVvSWx58cczj28VymUCCRIAFKZDRwOAWCqXprV 2hRmqUEszH5uRALgoNTVdF9Amjqxbu6ATkWIM8kNDxg7++vK3ZuuvxlCxePMCSMDg7F7 UwdQpCmWD45FXRAKPn7zsenGJJc7PiE1dee5JtEWKP0SKbEB2eQHXFEf8/XS7rnTqW8d drki9Cl9lmRDpjcMjIntKfc5s+xbXlqJgBOxvYvVjkXiVnnji62oscEH/SagxADkamsM shO5y2h7kH1Qc/RXRSZYP1xj1vhy50gnjCGl4jf+czOanwqgYaefLVdv4YW37qJ9+Kt2 jggw== X-Gm-Message-State: AKGB3mIPmpW1J0JiW1tPrUwfKR0lZxBdofgcPQcW+AoVnhPmtuG/TDGa NmcSCPARmEH2YvccbMoro2fSzA== X-Google-Smtp-Source: AGs4zMZyg0jYCIg3vDuaC7Gc8pHcsLn4se5TOGhZgFy1bBZI2cfzNw3DnuuQCsDIMatIMWlCjcBZtg== X-Received: by 10.28.136.66 with SMTP id k63mr12980364wmd.50.1512555714494; Wed, 06 Dec 2017 02:21:54 -0800 (PST) Received: from loys-XPS-13-9360.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 56sm2955886wrx.73.2017.12.06.02.21.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 02:21:53 -0800 (PST) From: Loys Ollivier <lollivier@baylibre.com> To: Andy Gross <andy.gross@linaro.org>, David Brown <david.brown@linaro.org> Subject: [PATCH v2] firmware: qcom: scm: Fix incorrect of_node_put call in scm_init Date: Wed, 6 Dec 2017 11:21:32 +0100 Message-Id: <1512555692-14439-1-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171206_022216_937035_ECE3DEAE X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-arm-msm@vger.kernel.org, Loys Ollivier <lollivier@baylibre.com>, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet <jbrunet@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index af4c75217ea6..5beb6a6adcf6 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -632,10 +632,8 @@ static int __init qcom_scm_init(void) np = of_find_matching_node(fw_np, qcom_scm_dt_match); - if (!np) { - of_node_put(fw_np); + if (!np) return -ENODEV; - } of_node_put(np);
When using other platform architectures, in the init of the qcom_scm driver, of_node_put is called on /firmware if no qcom dt is found. This results in a kernel error: Bad of_node_put() on /firmware. The call to of_node_put from the qcom_scm init is unnecessary as of_find_matching_node is calling it automatically. Remove this of_node_put(). Fixes: d0f6fa7ba2d6 ("firmware: qcom: scm: Convert SCM to platform driver") Signed-off-by: Loys Ollivier <lollivier@baylibre.com> --- Change since v1, remove the curly brackets as if statement becomes a one liner. drivers/firmware/qcom_scm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)