Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp107946iof; Sun, 5 Jun 2022 22:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzLlmuRBO0yTzuVkFxHC3dNenx43fa+CofAhgxtcYattH3ImHQNzc7mdmpGWjbwxkTy3V4 X-Received: by 2002:a17:903:1108:b0:15f:bce:19f8 with SMTP id n8-20020a170903110800b0015f0bce19f8mr22567311plh.7.1654493849431; Sun, 05 Jun 2022 22:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493849; cv=none; d=google.com; s=arc-20160816; b=CDEn+1PQsfkOlUv7R0MVaHepGk7ioUotP7qgB+bWPE8TA5KoHKA7+rWvwD/JtQzpGW vYAUjUo2lAoS6gtzcoKwXwdbCsWvSj8qbAhwq8fn1i6y3JWeyFTlJ/7fAvm4EkFzkpv0 +XH3iaeFgL6lMgaAOdmfyhtCmA9KvIDaf+ZgeNVyD/VTuhz9xPqLPQFQ4PYsKjYXxNa+ eQ1wVFstQDhMKkv9G/4XVCBNKPTGQp6iLa2kr5P8kcRkmFrtyecbQLvsPFR3nedQo3xq IBCUjLLltjePD+Sh2IHSST2XJo0edsEaPFRsW4rOuwDkVE8ywdWZ/wD7sYy95WzSrLMk Ae7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XunpJA6HFH8vqudHcGss9gj/AjBjqGbkSz4dNjIqUas=; b=OWbqV+sS/FICSr6n/E8Ns7hm23Wa1hOpzRw0JATqFjrqbSttr5OEU93OtQhUPUwx32 f8RDa7P37ORoB6zt5ZYBgWMoCYTM1+zpBqxAcTh7aHvwSkF5Jv9+faEKaFJWx6Llrm+w QNLOsB6mJc1oLJEhhpHBIOFa10QHIiajprMA3iRT/9SA8RX0lkettsvJcQa6ppdGp0R+ S24FSm5UbOtoPsa+tQmu5MHU/go3XqirbFW8m2VJ6jGS6cic03ZUc53IpsdzsqHcWXNV /5+DlGS4L6bI2AL8s3yLRNn9JSP2VvS4bgmVNqP7/r2nxeJJUdPfB9c4aGRugw8x9g4n zVcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nLHT/RZB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q125-20020a632a83000000b003fce50fb5f1si15154518pgq.299.2022.06.05.22.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nLHT/RZB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C54B1262D68; Sun, 5 Jun 2022 21:38:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345422AbiFCRt3 (ORCPT + 99 others); Fri, 3 Jun 2022 13:49:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345204AbiFCRsV (ORCPT ); Fri, 3 Jun 2022 13:48:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E43FA541B0; Fri, 3 Jun 2022 10:45:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7D025604EF; Fri, 3 Jun 2022 17:45:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89376C3411D; Fri, 3 Jun 2022 17:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278326; bh=sZ4yllEhtH7VW3/c5dkMAKfZGAOTfmyEplEGryc4wQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLHT/RZBbxA5chvwb0/YSUuFOK5A2Cu08iuo9MtWJuQUo9ewE7x6f+OyPGYbcmOlM O0Dc7qzxSjIiHKcyIzUSBSZ8kvaIiNq8WydCyxCr/SN+3QZXl1UPBGXnAgnEEA3Mpy EaXBm7QIHmFbyotZhhN+0RqQtLvwwFt7Dw36eEDY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiu Jianfeng , Stefan Berger , Jarkko Sakkinen Subject: [PATCH 5.4 30/34] tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() Date: Fri, 3 Jun 2022 19:43:26 +0200 Message-Id: <20220603173817.057325274@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173815.990072516@linuxfoundation.org> References: <20220603173815.990072516@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Xiu Jianfeng commit d0dc1a7100f19121f6e7450f9cdda11926aa3838 upstream. 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 Reviewed-by: Stefan Berger Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Greg Kroah-Hartman --- drivers/char/tpm/tpm_ibmvtpm.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/char/tpm/tpm_ibmvtpm.c +++ b/drivers/char/tpm/tpm_ibmvtpm.c @@ -685,6 +685,7 @@ static int tpm_ibmvtpm_probe(struct vio_ 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; }