Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2061104pxp; Fri, 18 Mar 2022 02:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgLvE9q3eUYxaUtEpHc9aeapzibPfJiigBn+7eKiWr7Jwc54madDnpbo20ImJxfnMvAlE+ X-Received: by 2002:a17:902:f787:b0:14f:43ba:55fc with SMTP id q7-20020a170902f78700b0014f43ba55fcmr9196568pln.3.1647594632943; Fri, 18 Mar 2022 02:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647594632; cv=none; d=google.com; s=arc-20160816; b=MhHP92PQx+kA9v40jfGeNqtwcsW9h3wZM0RMQIo+7vHOQKjpr2F8s3sCIYUyxlAzET tHIdjiTYvphtCLmYK5jhuf/0g1jsNTpFdstT3VUWxxey0RMqjPSgAlvbN99rl+wBG+4f pk6qSwymj+7MulvKCJAkX2YnhtsFcPSMYC4pZMbMFrNT8jSSLaPR2xGA6PWBirLnNzGV RpmkLLQz3McVIdlt4vFUyzIFtTtLFFOL1aASXYGhrbJGeB36IKAqtuSw9UsytvlUtNyf j3mCKnZhEcfIb4VUCmhPhwYNiczcYRmVjaE5h+HjUmFu6vSzMK3xY51nRNHdJ2KBle3d v0ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=AiPX0wkrSdG65yK4xoPOUdYkbS+aXqVmmWZ10CxaFMk=; b=qLiIoBUTsnWsxRAepcCaMi72Z9nelBtHM7uOKjuTMP180xbeKLA3kKfgWKF00EZaMW o588jyKP5h9w/p1OpR6WGElp8Of+d2WhLdxJG1EgGRe4HTUOln/PoFqXzVeBBksnfbiN dHx0Y225T4D4voidG5M5auISoiDIDcEAPQU1ogTlTmViinKfcBTdIK1k8R7gvuHN5oTX EvsHTMoiCnKgwd422dLXkR0l7aAnPRsObXJ2bnM4gS9oNXFjlmEk/rKMIrYnaTRTnk7c aVXLrxmV8nfz/d0FmJtE2RXLGDHnNo2CXkTNFEVgnlZMTssaAR/q9yEREu8hZcu7Q7pI FSqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a63200e000000b003816043f10dsi4262751pgg.770.2022.03.18.02.10.20; Fri, 18 Mar 2022 02:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232646AbiCRGEV (ORCPT + 99 others); Fri, 18 Mar 2022 02:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232643AbiCRGD5 (ORCPT ); Fri, 18 Mar 2022 02:03:57 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 950D63D537A; Thu, 17 Mar 2022 23:02:34 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KKYM96J93zcb6H; Fri, 18 Mar 2022 14:02:29 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Mar 2022 14:02:31 +0800 From: Xiu Jianfeng To: , , , , , , , CC: , , Subject: [PATCH -next] tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() Date: Fri, 18 Mar 2022 14:02:01 +0800 Message-ID: <20220318060201.50488-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently it returns zero when CRQ response timed out, it should return an error code instead. Fixes: d8d74ea3c002 ("tpm: ibmvtpm: Wait for buffer to be set before proceeding") Signed-off-by: Xiu Jianfeng --- drivers/char/tpm/tpm_ibmvtpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c index 3af4c07a9342..d3989b257f42 100644 --- a/drivers/char/tpm/tpm_ibmvtpm.c +++ b/drivers/char/tpm/tpm_ibmvtpm.c @@ -681,6 +681,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, if (!wait_event_timeout(ibmvtpm->crq_queue.wq, ibmvtpm->rtce_buf != NULL, HZ)) { + rc = -ENODEV; dev_err(dev, "CRQ response timed out\n"); goto init_irq_cleanup; } -- 2.17.1