From patchwork Tue Nov 19 05:13:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 179631 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp147297ilf; Mon, 18 Nov 2019 21:24:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwaUexPYmyGBX0deg/dCpshhpOHFAxKhrRXas99uCQCyGtmAsJQGxyCzYJJhYbGe4vuyLKR X-Received: by 2002:a17:906:8305:: with SMTP id j5mr20907337ejx.48.1574141071479; Mon, 18 Nov 2019 21:24:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574141071; cv=none; d=google.com; s=arc-20160816; b=RMH9fN4AYJcspmqn6E56SSCKM+gkwccpR/VNd7O4MH2TaIcJ6AmbbBKMfgTCU16pue kjcBsposXwgBFVQPzwlVUX4SMIJNEHs0NQomoUBPT2PxsffDRsaEgIXakKicXEiAc5E7 ZiTBWSfTw86eEw4lzAP5yE723D6Q0QSHWxKeJ9CaxtmDTZZ9XR/64UF52yWbRUiw6Y5v 2AhW9eBce2Q+yaboBDOIxEq46CnanF4G9jzw3sVtJpYU/R9nRmpGjtEH5I79aYQZnaQS fiIyhcYUiJJTLuahCWAO0dk10HKlbzsNRdHOpu1+C2tCaJyoZ+Z94bphid7Qvl0royOf iftQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fOA//JKXRH3JH3aVh9qwlNxS5eieQf8bEI6ZSdeQ7FI=; b=u2fMd24vhYeqrNoLXPAPtYJ3/FowKowuwz+8EHjq25rxS2/Ya9dIhvwFZjuM7NK6z+ LfCGxr9Z83bQffshLSuHRHIr8/yRppyT1gMjAOdL83SQ+1D/hMDHZP4cpsRDq6kPHiMq 2P2PEFZlEAq5tZOQWdHCoMHmNoxPSjRKrHZgmeHl09+82L3mol8WrTqDjogjaEYjU1/B di5DEVUV3P57c9zne7zIIlylHLok1WodMOaBSmJCPoR3Zw+ACTPSWMLIYXV4zWDk5KCE IJ24jqtbh+uC2g2O4Js2bY15SREYzj6JaQjtC+RFv65EfwQEWCuZvqyx9yDeNtE4WG+a eCFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ljLjFQMW; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 a26si4920896eje.383.2019.11.18.21.24.31; Mon, 18 Nov 2019 21:24:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ljLjFQMW; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728201AbfKSFYa (ORCPT + 15 others); Tue, 19 Nov 2019 00:24:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:40656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727452AbfKSFY3 (ORCPT ); Tue, 19 Nov 2019 00:24:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83A5221783; Tue, 19 Nov 2019 05:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141069; bh=3pZtjJxg82RJ4bLROtW2plxaPpzpKc7U4x+pscgL8z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ljLjFQMWMVPxJQZnrHhbXy6/rdYzzr6AY10IY58sMRDbEJ+xYPkP1zMI8cnNn9Tzi MiKD9fTYmPh/MYHDYuQipZUowUDtxzorF3FNhfKObsuxfpcrYzCtBqLWaTWf6OfFna sexJYcIxT0U3u8Vq7rtmmgX5fcR9h0k0Hto2eaGQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Jens Wiklander , Sasha Levin Subject: [PATCH 4.19 034/422] tee: optee: take DT status property into account Date: Tue, 19 Nov 2019 06:13:51 +0100 Message-Id: <20191119051402.211777274@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ard Biesheuvel [ Upstream commit db878f76b9ff7487da9bb0f686153f81829f1230 ] DT nodes may have a 'status' property which, if set to anything other than 'ok' or 'okay', indicates to the OS that the DT node should be treated as if it was not present. So add that missing logic to the OP-TEE driver. Signed-off-by: Ard Biesheuvel Signed-off-by: Jens Wiklander Signed-off-by: Sasha Levin --- drivers/tee/optee/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index e1aafe842d660..34dce850067b9 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -696,7 +696,7 @@ static int __init optee_driver_init(void) return -ENODEV; np = of_find_matching_node(fw_np, optee_match); - if (!np) + if (!np || !of_device_is_available(np)) return -ENODEV; optee = optee_probe(np);