From patchwork Tue Mar 14 05:27:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshit Mogalapalli X-Patchwork-Id: 69313 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1590540wrd; Mon, 13 Mar 2023 23:15:20 -0700 (PDT) X-Google-Smtp-Source: AK7set/vSpaEXJBTp0PsGu3y2Al9NvwTdynhZbTW2gl4YpshhAjMaTdKFGDEL3AcOZ82AK476G5j X-Received: by 2002:a9d:6d16:0:b0:694:3cff:3cdf with SMTP id o22-20020a9d6d16000000b006943cff3cdfmr19671819otp.31.1678774520718; Mon, 13 Mar 2023 23:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678774520; cv=none; d=google.com; s=arc-20160816; b=rMP8G8GmsIYug8syrNx7mlMGbQ/EsEhh/kLD4fn3jh7pd+0TiXne9+FVOAKxZhuOZU 2Xyjav52L4RkTWiIwiT9LqJyGH0anpA1eNfCM0hVDDES2f9VqN56bNRPmcSpQvKi7TVa SW9JjAOwdTZJLKR2U/6Kjf/yuhXfpQzvxYCX8ou+hOBgC1NTG4GXe7e71+sgL1OD6WVQ LyBlUOXUdNwd7PbzsVB1/uaySFZc23LM64TgXXw9TDmgesVBhms+wtlyvSE6PLdx9rCK 6WpAOa9ejZ7Mif0LwrCETVOIBzYjGVqrkwgbqxKjXRu0V7wJOdsaBJMICy8Oy1F1jHaJ g2yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=5SLUSnIKYxP4buvBIm9cjePOKlgWL/aRgB/uzZTFkBg=; b=sTT+hf3KC+7JnxX6GGk0fUhfJexZjx4V5bRU7WXa9i15IVfdpyKvPxWxQ/iS+ZPpCO rB8TEMC0P/xFIgQPLpWb4EHxev7yUlWtQDzQbm0VTSBZcBECjGffNUfXToxCzOIJq+gh csJemUkdq+CKnorqMCfhEnek05smx5CbceE5v147IaBIh2AhnkSdeiG1b925M7C80PrK KZXOInSlOuCU8tmVfMVTOvV0UrjA5ZFKJgIgOQ8tv2LwPhe+7gX0wAsrN6Cki5+YFgM0 QCVWiuahDZRgl6VlxjAbMfFQ7V1PCaZCQWhBumywqq9BRAtfUzYrakp724w8nle2SbP0 b0ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@oracle.com header.s=corp-2022-7-12 header.b="Uiue91/R"; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e42-20020a9d01ad000000b0068d43acb38asi419930ote.315.2023.03.13.23.15.07; Mon, 13 Mar 2023 23:15:20 -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; dkim=fail header.i=@oracle.com header.s=corp-2022-7-12 header.b="Uiue91/R"; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjCNF1n (ORCPT + 99 others); Tue, 14 Mar 2023 01:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjCNF1k (ORCPT ); Tue, 14 Mar 2023 01:27:40 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5DF90084 for ; Mon, 13 Mar 2023 22:27:39 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32E3iOrO009247; Tue, 14 Mar 2023 05:27:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2022-7-12; bh=5SLUSnIKYxP4buvBIm9cjePOKlgWL/aRgB/uzZTFkBg=; b=Uiue91/Rpc4KiaVrDYL6cM6O/18andQbv5Vgw9ljjg98gm8Xl9RcFXcahEnScNrT7Xgq 42qTiDVmdG+ICKRPJtGJjr2Cc+WXWSei4Grl6s4nswnkNgSTC9QkNcGKB6y8fyGe+U9z hPTdaFgaazDvKwmsEc5ly75aMBbqMHfoLvLzvz4+X3uxBcJ5m6WtfL2AkerISPlZ6bm7 aIAqrP9YjylId7Av9/2FVn6EBusVZk8z7jnU9xNvmbILfsxO65oynqVAH4w42LEYVFGK oiyGmilcA2+7jFUgEjSLFKbLdb6dd9EZFDHL6A11L8U31NXaVzdqAX/ew2lY4RIfVj/+ Lw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3p8hpcwfgy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 05:27:16 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32E5I1vv002320; Tue, 14 Mar 2023 05:27:16 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3p8g3c52kc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 05:27:16 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32E5RFIB024363; Tue, 14 Mar 2023 05:27:15 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3p8g3c52k1-1; Tue, 14 Mar 2023 05:27:15 +0000 From: Harshit Mogalapalli Cc: error27@gmail.com, Harshit Mogalapalli , Qiang Yu , David Airlie , Daniel Vetter , Eric Anholt , Andreas Baierl , Simon Shields , Heiko Stuebner , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe() Date: Mon, 13 Mar 2023 22:27:11 -0700 Message-Id: <20230314052711.4061652-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_13,2023-03-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303140048 X-Proofpoint-ORIG-GUID: f2EVr6K09Hzuaf-YCWzZPzCu47m4wKKc X-Proofpoint-GUID: f2EVr6K09Hzuaf-YCWzZPzCu47m4wKKc X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760322671601311165?= X-GMAIL-MSGID: =?utf-8?q?1760322671601311165?= Smatch reports: drivers/gpu/drm/lima/lima_drv.c:396 lima_pdev_probe() warn: missing unwind goto? Store return value in err and goto 'err_out0' which has lima_sched_slab_fini() before returning. Fixes: a1d2a6339961 ("drm/lima: driver for ARM Mali4xx GPUs") Signed-off-by: Harshit Mogalapalli Reviewed-by: Qiang Yu --- Only compile tested. --- drivers/gpu/drm/lima/lima_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c index 7b8d7178d09a..39cab4a55f57 100644 --- a/drivers/gpu/drm/lima/lima_drv.c +++ b/drivers/gpu/drm/lima/lima_drv.c @@ -392,8 +392,10 @@ static int lima_pdev_probe(struct platform_device *pdev) /* Allocate and initialize the DRM device. */ ddev = drm_dev_alloc(&lima_drm_driver, &pdev->dev); - if (IS_ERR(ddev)) - return PTR_ERR(ddev); + if (IS_ERR(ddev)) { + err = PTR_ERR(ddev); + goto err_out0; + } ddev->dev_private = ldev; ldev->ddev = ddev;