From patchwork Wed Sep 1 17:33:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabiano Rosas X-Patchwork-Id: 1523363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=j5fyegUd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4H0BNq5F9cz9sXk for ; Thu, 2 Sep 2021 03:48:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346011AbhIARtH (ORCPT ); Wed, 1 Sep 2021 13:49:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62694 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1345760AbhIARtH (ORCPT ); Wed, 1 Sep 2021 13:49:07 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 181HYX7W037423; Wed, 1 Sep 2021 13:48:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=w6vSfC8ub7QVGUYLL7Uu86Si2DTC9/Kg5T0HaqwapRM=; b=j5fyegUd8a6a1t0YiVJO+l/WPDFP6N3puvXVYumDk7M0xTgFnzOBRGxSBIF7fwEMM1Vl sIhcD07SdrqKI2gUh46gaVWvdUnjLhWtYfvkg0+CmZDUjx4UyZaq/HbdmFZjrkxhYdIS 1JHjS9TmH4daKrhMQQ0+DAOsxrFj7DBGGrDAPzrPg59YCA1yx/EgUqU0A6rIpB9o46K3 axLMnuLO2SC5TJ9oRdG6mzl3bHcv9vsSOPiToDCVN1FFeu8ponYFArZ5zRJ5DbYbZA5R eGWGMBQMKbYGHzxLXAnnQvbmwwEKMa9keT25gSRcWt4wKekd131jsHfXfymh1fRwIHth jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ate1t0amy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Sep 2021 13:48:02 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 181HYcXY037647; Wed, 1 Sep 2021 13:48:02 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ate1t0aju-10 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Sep 2021 13:48:02 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 181HXYo5010941; Wed, 1 Sep 2021 17:34:06 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma02dal.us.ibm.com with ESMTP id 3atdxcr4un-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Sep 2021 17:34:06 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 181HY4VA39518510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Sep 2021 17:34:05 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD93F7806B; Wed, 1 Sep 2021 17:34:04 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4303C7805F; Wed, 1 Sep 2021 17:34:03 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.211.58.54]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 1 Sep 2021 17:34:03 +0000 (GMT) From: Fabiano Rosas To: kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, paulus@ozlabs.org, mpe@ellerman.id.au, npiggin@gmail.com, david@gibson.dropbear.id.au Subject: [PATCH 1/5] KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init Date: Wed, 1 Sep 2021 14:33:53 -0300 Message-Id: <20210901173357.3183658-2-farosas@linux.ibm.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210901173357.3183658-1-farosas@linux.ibm.com> References: <20210901173357.3183658-1-farosas@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: UTWEMEuZiIceOGUKIBnQhPbK1jiuEhiT X-Proofpoint-ORIG-GUID: LzUojxREaa7Oj9cRYkX_izIs_yajtVOW X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-09-01_05:2021-09-01,2021-09-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=971 impostorscore=0 suspectscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109010100 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org The return of the function is being shadowed by the call to kvmppc_uvmem_init. Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support for running secure guests") Signed-off-by: Fabiano Rosas --- arch/powerpc/kvm/book3s_hv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 085fb8ecbf68..4cdf2e6e1cf5 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -5996,8 +5996,11 @@ static int kvmppc_book3s_init_hv(void) if (r) return r; - if (kvmppc_radix_possible()) + if (kvmppc_radix_possible()) { r = kvmppc_radix_init(); + if (r) + return r; + } r = kvmppc_uvmem_init(); if (r < 0)