Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp80075iof; Sun, 5 Jun 2022 21:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOdx/y/86YI1iBerSYUvZMxTFXHn8zchWK4RyBGQDXH5qTVMChA/WFFpPUo1PI+jv+U676 X-Received: by 2002:a63:2a89:0:b0:3fa:cc62:e00f with SMTP id q131-20020a632a89000000b003facc62e00fmr19373518pgq.364.1654490664163; Sun, 05 Jun 2022 21:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654490664; cv=none; d=google.com; s=arc-20160816; b=l0owE68JyPjUkMAMPaXJBQ+j8QrRzQCnvSsbfSw7CuGFHvXOoPuVk+Gr7tFnD4R9+4 /71iyGh5CRBKPcBuEsIeNKh/m0nYF+Ascsg9dCuKFDKcEvYIT7ovwByuo9tDWWRFaIzT bMnPzs94BxDII7VM6zsxVXJXeJJ9Y9gI5923MDPZ+RBOfHby9bEFFihCA+wAAI6a7nuj RzXch6CW4ykaHUCX1BnmfZcHIHwiit6C3MEFDPuOVIMutLs5KXEju4IMPf5CHREEzVKS +jnwLSKbIjEKUwFoGEyy3wikSP+D5HU8QVO67DG+uQCkyEFScLXfuWG/uAyPvVOwkbb0 Tmjw== 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=S2krI4d013ZLAdl/Ys6XE/bLDxUVCGhQGKDJLv/bc3o=; b=oqpGiMyuLdmEKorzK3GnSqVn5Dp6Js/hKBDXJpwLwpxDFlz1EM9ljfdsBobK5B/0f+ U/4FpVO0MfokMTzjurxWkUDTSDq8gO2PyaDxTmvDTbaeSAbM7dszKdZpgcsAUrLUhjgA 5uMkNXgmSjHz7D+UVYZ/s3Dbfu3LCiBsoRKl7BuaCaGLApy0SBEEO8AYZSbCT0n/AtfW W6wWpNlNvfH5+YHYhNP/OSRvjx8Ifxd/lqrWnEX0Z0L7D0FioOLXQ8LMWwppsk1nBaMV uIFEMaMzwGCnRpv+Op71lsSOoDVrCNFPTtBYmtXaY6tkiUWKx8Rpm+3etYctmuj+rtJY bCQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FC4bWCNv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id z13-20020a170902d54d00b0015ed92d19adsi18748740plf.42.2022.06.05.21.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:44:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FC4bWCNv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 E67DF12D29; Sun, 5 Jun 2022 21:02:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344888AbiFCRmw (ORCPT + 99 others); Fri, 3 Jun 2022 13:42:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344801AbiFCRmI (ORCPT ); Fri, 3 Jun 2022 13:42:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB09F53A79; Fri, 3 Jun 2022 10:41:28 -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 ams.source.kernel.org (Postfix) with ESMTPS id 42582B8241E; Fri, 3 Jun 2022 17:41:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97AB4C385B8; Fri, 3 Jun 2022 17:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278086; bh=5DLh3zfwqkuKS/K1n4AvAGFzOB5krvK1ROtUZvkNdoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FC4bWCNvWYoP6zcb12VGP/HM1Gtyj/LFusqdLmagxg5YK6phPCTQhfV0db39bFK7D T9SulEH9c2cXF0H4Mcv1r1NP6rhEg61YL8fLT84daW++2Py3HBUPgfs9hzHeEb2ZSp Z8MjoY+/hK5RqmbZWyRO4W2MCYNL7DSF63X4IHAY= 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 4.14 20/23] tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() Date: Fri, 3 Jun 2022 19:39:47 +0200 Message-Id: <20220603173814.974445103@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173814.362515009@linuxfoundation.org> References: <20220603173814.362515009@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 @@ -692,6 +692,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; }