Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp131184ybk; Tue, 12 May 2020 17:40:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZbZxP9Gb+GUwaa1zuNmHDfm85c3sGjsEVRnDSQf+XDT71wI4w4VUmKYhl3TPubJh+iKyw X-Received: by 2002:a50:c014:: with SMTP id r20mr8226922edb.110.1589330458735; Tue, 12 May 2020 17:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589330458; cv=none; d=google.com; s=arc-20160816; b=o7DnnB7fVdEDIkGXxTisWmITWeu/MrjTNc0uwkWJ3gOzd4lEMKVVIQYQYQ6KXc/3vB 0hsQkizmJfLHv2VH5JyNRmkKr/JGfbqHK74h2wqtAY8VuBc44+foD+nrbB1QGibnLcFf pyl3ipGZdmw0bvTJiioXT4cQHIZu3Yq4jeX3tcH56PIKZyGaVEXofxTYt2d//qaSH2lo MbqDM4r/Ohso72HML6MS6yXz1SKUIIJmcmLeSfbGfk4pYZUiXtei2awl/gt/THT+Qfxs UCMBorJNLjAPkdAq1+n/yNp2fm4OXGUg7OjUrSzk8TYK1CwcANGzB3UvV7AnxaU74/wh e9uQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BFnha3juNtdQwnlUrwhd49/JpREi0dStok6F90+eN7s=; b=qF3DyHLxYb5+Vv8TOt2ibQNzKJ+uiH5StVgyws2CPxo79xI38EWpWyV6+wFdHnzduy /uHDXFbScC2lVfopZYZEsWNQ+AHd9iKh6NvDF1nkaSa/LdauVR8JXxFmFtW29ET5ifDR rpV3jPQJ8m44blfnM6Fk8rkJnTx8KQhbGYZCdOddbk4UsZIq4PrRkzBdGScxZ3o/urp7 bSX+L3wAr2C1qtk4a2lGIcXrWF75DAPh+fgpFBGKnVTxeL7A7eByJ8awBcSgRwXXUVds dlgUBv0HbSqMChs1U+kEu9ZohluSVlbmw29TDDTxYbTSLQhSONYNp9IqT675i5O50HT6 Dtig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nQEDInAF; 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=pass (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 r20si6581299eja.234.2020.05.12.17.40.35; Tue, 12 May 2020 17:40:58 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nQEDInAF; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731689AbgEMAgx (ORCPT + 99 others); Tue, 12 May 2020 20:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731107AbgEMAgx (ORCPT ); Tue, 12 May 2020 20:36:53 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0C17C061A0C for ; Tue, 12 May 2020 17:36:52 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id w10so5055016ljo.0 for ; Tue, 12 May 2020 17:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BFnha3juNtdQwnlUrwhd49/JpREi0dStok6F90+eN7s=; b=nQEDInAFXPsRlX9/jtjvkCM2Ej5QMxbBHmOJ6u7TuJEFEnOZY6l8ggcp2oBE9nojyR +mUGlSPaD1N0KRiwOiunygOMYmvbo0VYuvpuDwt+ae5zDFRU1320yC0EC82SiSa2dDeU GF/DbPR2wE4+cqGQsOafdasBoVH8dUK7fk77Z2UTZ54e65JoLJ9PEg6HMBgtQdHVsSGd k3ayduKbTDPdN9Nc8NUtr/oHu5LSfSBWq7AMoUevIg+g1F0NJOoxrhEgJAD9fPf0Un2x q3C0KBCOLZd1oYc9IA6k2HF9/JELPJVhB32hWfn5H+fMdKmscpcBbCvqD32Xu/jcthvG 4bRQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BFnha3juNtdQwnlUrwhd49/JpREi0dStok6F90+eN7s=; b=m+Mx8XYYokOeuBytJq56Joh7T/E+xAnAEQUR9j1kRiyp70FFctixaMxBL3ktU9VzEA lWdpzO3wm4rU9L9tGOu6aaJDIYkWwseBkXWuyB5+JMvqYDUPF9lq9WrNtukCprxobLyC xSlHz8rZ5nr/Hb+JSzP6C3vUnKpHozUshQMIVgk569Vzfr6UgUdL6u4GapcdGR1zDgiK EL8B7Cjn9xqqbrK4gDJkQ58B5iPqWGpXpc1atVsDCnVKZuBg6/izF9FiDjOMp1W26vPZ vInnXQ6t/BP1uDA2IiZDeO+rLcqVNr65XhC0npTeAPuo/sSG17oy4yv/c7yg6hZsbhR7 F81A== X-Gm-Message-State: AOAM530/2RjVBdpv5mCbfrhJMzq2GV9swu1dGXynI8O7kjWB+dATkPRk CMwV7EexOP8wvMp74dtrJh8= X-Received: by 2002:a2e:584a:: with SMTP id x10mr5412633ljd.181.1589330210801; Tue, 12 May 2020 17:36:50 -0700 (PDT) Received: from EPUAKYIW2556.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id q7sm14216786ljp.20.2020.05.12.17.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 17:36:50 -0700 (PDT) From: Volodymyr Babchuk To: Jens Wiklander , linux-kernel@vger.kernel.org (open list) Cc: Volodymyr Babchuk Subject: [PATCH] optee: don't fail on unsuccessful device enumeration Date: Wed, 13 May 2020 03:36:25 +0300 Message-Id: <20200513003625.651340-1-vlad.babchuk@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513003430.651232-1-vlad.babchuk@gmail.com> References: <20200513003430.651232-1-vlad.babchuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org optee_enumerate_devices() can fail for multiple of reasons. For example, I encountered issue when Xen OP-TEE mediator NACKed PTA_CMD_GET_DEVICES call. This should not result in driver initialization error because this is an optional feature. Thus, it is better to print warning, instead of termination driver initialization. Signed-off-by: Volodymyr Babchuk --- resend: fixed email in s-o-b tag. Sorry for the noise drivers/tee/optee/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 34409c916882..a053930032f2 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -728,10 +728,8 @@ static int __init optee_driver_init(void) return PTR_ERR(optee); rc = optee_enumerate_devices(); - if (rc) { - optee_remove(optee); - return rc; - } + if (rc) + pr_warn("can't enumerate optee devices: %d\n", rc); pr_info("initialized driver\n"); -- 2.26.2