Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp114323iof; Sun, 5 Jun 2022 22:48:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx4L/YuQY5PnUXjJd63jCuHaIZ6lnRAlvoHIO1xNlgFsunYdzULomSe4iLV9oStK4uaRXI X-Received: by 2002:a17:902:b10d:b0:167:5d84:7f17 with SMTP id q13-20020a170902b10d00b001675d847f17mr11166944plr.170.1654494501189; Sun, 05 Jun 2022 22:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654494501; cv=none; d=google.com; s=arc-20160816; b=PFJ8Gh+Te3BpalfA65Ju7+BDCjqfDXzxUDMHmdL0YqKLIhVisontDj6exKULv84tKv aPoNn5R0InwtBvxrCCPNk8PY5NlOwSYk+KbiXgZF+VipFGInyeQmcKuL3hAfvMk5qaVU +FwgccXUlEyTIzfuRouJXyixsz5dqtU1IVuBzGbs0MtCfztCXKrcosBxI83WNHFekoWi pd0pdk8VVfPLVxhlKtef6Tr/84BliiZR7z+fVYrjlIDzaQ9Iw1OFkZRJA8mHxG9UZVH1 jaCEmzPqkzPDqYpdGkJY++fAu1EPmOw/W4NPc7DQQeeOB5HJrgDRk5BulmEzXyPnJReK VykQ== 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=kuKt4m4pn7Bz+ECI8N+Hqg5RWnzQzVQhZlzi1OORat3MniXjg0ybLHc1wT/AVm+ZfO 9g6O+/FHJntOOnuAAbiLhuRfHOE2df1jy7hkwU/4p5mHlX2s9uhZLhj4rb39mvkDkCwY vR7OfDaTJcR34Qi66ei9fV5ewfY3qvi+CI+LSENxuU6m5A3r8ykXUN5xf1jFYMXHXzjM 12nY9Lv77kGhoK+21CDjAoQMPE23SY4atByVDx1BupBOMIwIj1wO9E8tH8qL1nOATtZ0 6f1MQzLB+/ZP6DFDLLca97CgHG11MyIVV2QN2Phcplt8T3ovrKaAMbmwLwJ6iFR/kzBa DHjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e1mlHhhz; 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 j17-20020a634a51000000b003fc5c9ae7dasi19660635pgl.595.2022.06.05.22.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:48:21 -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=e1mlHhhz; 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 6D76B27F895; Sun, 5 Jun 2022 21:39:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345131AbiFCRpo (ORCPT + 99 others); Fri, 3 Jun 2022 13:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345255AbiFCRpB (ORCPT ); Fri, 3 Jun 2022 13:45:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0896855494; Fri, 3 Jun 2022 10:42:57 -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 77A6A61B23; Fri, 3 Jun 2022 17:42:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 644EEC3411C; Fri, 3 Jun 2022 17:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278175; bh=5DLh3zfwqkuKS/K1n4AvAGFzOB5krvK1ROtUZvkNdoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1mlHhhzyqIXc7aSclwZK0H3nnZ0qufPC6E59XuRb45+15ulS3iByKD8XOz2/3PMB suIB4Pfjst+x3BkJfU1TvnCBK6G/iF7r/VRP2bfTuut2/2zjz+iFE+BEw9FBooAMqJ QhOGjKV7+9+WmearcWOupL91Pm43Mwz1Ku49ypnQ= 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.19 27/30] tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() Date: Fri, 3 Jun 2022 19:39:55 +0200 Message-Id: <20220603173815.889423770@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173815.088143764@linuxfoundation.org> References: <20220603173815.088143764@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; }