From patchwork Wed Dec 6 10:21:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 120802 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3269942edb; Wed, 6 Dec 2017 02:21:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMYJQpIPWZL1s8XD+47Komhk9R9r0j5BNNGCrOcAu2y1fOYoZl6q0IRsWKHV2/Fmzu5bf24y X-Received: by 10.159.253.74 with SMTP id b10mr8791059plx.440.1512555718853; Wed, 06 Dec 2017 02:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512555718; cv=none; d=google.com; s=arc-20160816; b=M5O48dCY+GmcABWjR+Pcij1P2RXhuAcyosIv4oC7biw72d2C3W7Y+LfhKm0i843QI7 N13IlAJeF6S6HUY9GkyT+RPgzOyuGz6Uqwbn0zmCdx2iFQPESYOkHzB0CQk7QtQvRv9s PeVAX+8Io8scU+qcwJ9SkrKK3jMMZ/hxcXqbrZLNmIXLqzd98zOmBB0sDnIXuymbiftU kCIb3VK0bclcTWeeOvAmRQaQItKYdnr2iQDPKZ/K6Pdx8LgzNoKO21LpdOvIYFvtt2NN tBQg1Cl3eC6P7lFFzRFlU23ZWmr3/WgmzyOZesfYlLHqZMsqxc69oeRcG12SGlX8xUp1 iSHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=G+YVCUqwi8zM1CnonkLmsL+s9i48sEUp8U7cEl39vAA=; b=a9l3KWstmm/DNeATkE1ESoK/8eeoWuvjkGhMcdbafmscbKS5skYmuRMXJjbXcSTdS1 UYIyUsscNBQ/nL+1L9DhVfLcBhmAL1hYtKRrcLgUlJf7e9MZ9MiXsXW7OYClLkS3jndy eJa9qpEqp5vinxQ4iSkeptqBSwTFFmT4VGv4au/OF/+WM3gczIF0Cs3KzZb5Kw3gVK6v BNzpQtZ/3vbPSiACN/Lu4pvono8rgQnDbE9d/nTmkDUFBLdDSbHsU6h90npqQxP7XE32 I+umOt5+ZKjsTHo3yXqvMpK3tZZ9pDw1yOJe52a4wZ1W7MNBH9pQgacBUuOoJV9jd1d4 zbMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gx1O2GgE; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si1658033pgo.453.2017.12.06.02.21.58; Wed, 06 Dec 2017 02:21:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gx1O2GgE; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754805AbdLFKV5 (ORCPT + 10 others); Wed, 6 Dec 2017 05:21:57 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:44809 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754790AbdLFKVz (ORCPT ); Wed, 6 Dec 2017 05:21:55 -0500 Received: by mail-wm0-f68.google.com with SMTP id t8so6240364wmc.3 for ; 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=mt5zdmCPvoD3+AQN9lCPsknj99WLF3D9rEC4veuhHwlof91R9CqyjQd3wC6Enob/xd 9dvwtRt3rjN9WJOdT5X2JAdZS2TKGY/dnmXXS+MHei+ZEIFFKjednq+Kos+JfSlw87iQ WVE3oZxXZRCHHr2UJ90RO2Dgm3Pe7S76EIjOfjt8AU1wJYjC7SPl9IAVqTd9UMEJ8Rqv vv6nI0HCR+eI+yqwgV2DS8Aeh+S0iX/PUQvPA7nHQG4O+3OwyPQ+RM8lltfmHV/HzKQj mKRqGRpNYOZuo24urCijCUbZgMxiXST2E4gGf9qPysaI8efvsxBJsX9CVfMLFe3GbcLl sZ3w== X-Gm-Message-State: AKGB3mLOKjxqnIyVafS33qOZIMDpFTAjYx1ZbUc/pW2hfvLLcziGBXRg S30oDZ1MUGdDjC3Gy6qNJVD1tA== 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 To: Andy Gross , David Brown Cc: Loys Ollivier , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- 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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);