From patchwork Wed Nov 8 13:07:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 118258 Delivered-To: patches@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5265022qgn; Wed, 8 Nov 2017 05:07:57 -0800 (PST) X-Received: by 10.46.25.18 with SMTP id p18mr226206lje.24.1510146477773; Wed, 08 Nov 2017 05:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510146477; cv=none; d=google.com; s=arc-20160816; b=CjRIK7iZUw1YTob8invbLAVnRrj0qt8U0mGcR4nJ/wpIY/HGmh2PNh/DCJJ2byKpO5 Vm9LN+bDRerq0cTtE41+sCc2piba6OGafuUp0bzEtOqz9dnyH7zxZoC6HvqDrJ3HZwTw poyKXtJP6tcL15UBhIGtbMPMEkaJ3FhHJlWKAs3J/CwDHIyAmlTlCW5RnZNbyPMKt5xf KrxR7oAgkdYPegmktBapol32IkefFpg4BeqXGtXERVFKAJTxLWm7ypKepR9ZqayvNqu3 n21C7z/enbvSdXmQMnSSVzFCrjAIKwPiz2bG8jVItTwcRhi0X922nXPpXUF0aEOBHi2W fnZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FZytlhCiWNQxMLTnrpb9EMmT+bFlbUHBiKPCADXZ4zc=; b=gOR0DskVBRU/mPZbv1qtNS2v/6ospFuH4BaFufcjTR9YrF9K38Oxics2kdIdHny90x x8BHmzAJ8+6uUZMl6XBw1BrDQG1ps005WhA4sP/JUiGW0eAwF0yYXhXB7Gg35N+g6xym +OTDNvMvwqIpczqxzFKZdfrleuONR7YbUyAnR+IUai8vX+VS1xVwYjacUqCAhs+mOyNl 1JvQa+u+hAh21eBOpAu1UE1fbtVCtzVYzb0HOjsWDFxjrmcFrBqFV7s1ZnX8DqXn3p3r 2KJuNdhasicKjSFvcRBeg02HiyFIMt/Ult2dkfKUHY3b0s0cN8LF4h1KqM5/KEyCBkMs BGZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gbB//MVs; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g21sor634643lja.90.2017.11.08.05.07.57 for (Google Transport Security); Wed, 08 Nov 2017 05:07:57 -0800 (PST) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gbB//MVs; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=FZytlhCiWNQxMLTnrpb9EMmT+bFlbUHBiKPCADXZ4zc=; b=gbB//MVspeuQdQp6Ufpk7zCrDUlw9c6BWQwhKT1mOHYTLpRUXMRlq2Ac5mY9ZD6riq fxI26bjVIJ1aPw27GvhJWJTtmKX9+mkOrBXDYWk3Ymb4Mv8BGAKSqv3xrvcfzxRFzjnm 0pExk7qLkDjGfqXSVM+nraQ68/R0uQvRwUzIQ= 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=FZytlhCiWNQxMLTnrpb9EMmT+bFlbUHBiKPCADXZ4zc=; b=IOZXNkPnx6eq6id+kGq5Nqoc19rJFfkzRPn1r8B3WV+T3H/FUw236kAJmRWtEingQC 0TwCO4sa4K/zXrWU4Fydee4xxECFwHxJHs+D+6HlEya+ailxqYXwSrtQL/We58unuxL0 76rp0TOLH0Yryt2Rzj6gyYid9T3njb/MYDPkRWhK86ruGFktU9Wg9ok5BOSV698iWQf+ SIP4vOaEaXCBt5ady1czDbg2olhmeH8rMY9Wr15VY5UUwWcQ9d4wIc9v2I0+MTY9nBjP zzF/7dEuCvEWIJsJNmU1WX+DPknPLeE6zEkyONChkgn63msYxDPTNksGKAqmo7k1/rVs XgOQ== X-Gm-Message-State: AJaThX53JSwsmu5PMNUlrGdu2+KETHVmqLiMeyYd3/fsIgQ+7eqkhcm7 VYIOiYizTNuZIzgcLlx77AsdAL6O X-Google-Smtp-Source: ABhQp+RZ+8xJ5i+jXrEGLBU1wBeiuOeUt6EzwIgaMNSjggSD71PfrOQx70xJUJqFjNv/dQAdLb5oTg== X-Received: by 10.46.22.88 with SMTP id 24mr233850ljw.20.1510146477448; Wed, 08 Nov 2017 05:07:57 -0800 (PST) Return-Path: Received: from jax.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 77sm782706ljj.12.2017.11.08.05.07.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Nov 2017 05:07:56 -0800 (PST) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org Cc: Jens Wiklander Subject: [PATCH] optee: fix invalid of_node_put() in optee_driver_init() Date: Wed, 8 Nov 2017 14:07:52 +0100 Message-Id: <1510146472-24069-1-git-send-email-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.7.4 The first node supplied to of_find_matching_node() has its reference counter decreased as part of call to that function. In optee_driver_init() after calling of_find_matching_node() it's invalid to call of_node_put() on the supplied node again. So remove the invalid call to of_node_put(). Signed-off-by: Jens Wiklander --- drivers/tee/optee/core.c | 1 - 1 file changed, 1 deletion(-) -- 2.7.4 diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 58169e519422..18c8c0a50d37 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -589,7 +589,6 @@ static int __init optee_driver_init(void) return -ENODEV; np = of_find_matching_node(fw_np, optee_match); - of_node_put(fw_np); if (!np) return -ENODEV;