Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3551830rwe; Sun, 16 Apr 2023 23:03:14 -0700 (PDT) X-Google-Smtp-Source: AKy350YZOX0QDeuDX5elS5dFZFmd19CGq/aF/XOqfJdKCXfiBtceqhVBMxsNMnE8Z50Y+4OWqSpI X-Received: by 2002:a17:903:2443:b0:1a6:bb7b:7a40 with SMTP id l3-20020a170903244300b001a6bb7b7a40mr7228040pls.64.1681711394307; Sun, 16 Apr 2023 23:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681711394; cv=none; d=google.com; s=arc-20160816; b=SjbdYLUSeUiHCFmvSp14fX7i8CL+Lo1QJNf5AHlHSIoT9GonsaAD9Ua+ZN7lnetv83 15ySZE5IjD8fmas+nMWjiVEUc6SrrulY2+wU88BG8TAhtiOSms7xxm7KAiM2YuLNsYTP mrq1+xh1WRHfO3ePy6rdbjDz3H+sXI7Dhv0GH9WJXq1HdHaesAJqoTr5DrE1PlPDTZhR qX/rw9tza9fAar00dKgaA5lKshipC6TEHia5mbMfKSJhSUTLGnw/Fm6pfqnz/qpWbSiY jorYYG1MkI0yHbVJbd6OAUF4tQ+fEthhY5cicEWEIiS6WJS0MkRNnWrkDXdR/ClivK/o S4hQ== 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 :message-id:date:subject:cc:to:from; bh=Yd+4Vse4cb72GczJyzYicBZwW7LqqoImNv/qSN3Kgyg=; b=jqnKcHQxQUeUDJym5tN2FGVZ2H0lkcBALjNUgU7OL3wv/2P81nJYCx/HVScNiuQykZ v1dfRdygB3aavBbrenZuYPTZINpQTkLXsxhBPou4jkuDaWIdZcYT8ZoUp1M+qY975uw3 nZSJfSLTuapjppUFawohOY12k+mhPx913UebH1+6HVghPsP6DyLX07BB+OTGBvJ1lDwK HopcKGoAe6hcfrzGC3/gBg/Ta6qSdO9GyAJXl9bLQFdbVX/SLRgCnryF+n3qleM12KD0 6n3yR2MgidvH/0+JmRW0LEF9Lfat+dT8wlIjpa0vCQD7NNp3E+hCdcPL2uvoinwT07J9 hVGw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a17090ae00d00b00244930ffe45si5344458pjy.0.2023.04.16.23.03.00; Sun, 16 Apr 2023 23:03:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229789AbjDQGCy (ORCPT + 99 others); Mon, 17 Apr 2023 02:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbjDQGCw (ORCPT ); Mon, 17 Apr 2023 02:02:52 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D9382D53 for ; Sun, 16 Apr 2023 23:02:50 -0700 (PDT) Received: from dd-virtual-machine.localdomain ([60.247.94.10]) (user=U202112190@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 33H618GE027391-33H618GF027391 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 17 Apr 2023 14:01:10 +0800 From: Hongqi Chen To: Patrik Jakobsson , David Airlie , Daniel Vetter , Dave Airlie , Alan Cox Cc: hust-os-kernel-patches@googlegroups.com, Hongqi Chen , Dongliang Mu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpu: gma500: psb_drv: add missing unwind goto Date: Mon, 17 Apr 2023 14:01:05 +0800 Message-Id: <20230417060105.16411-1-U202112190@hust.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: U202112190@hust.edu.cn X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Smatch reports that missing unwind goto in psb_driver_load(). drivers/gpu/drm/gma500/psb_drv.c:350 psb_driver_load() warn: missing unwind goto? psb_driver_unload() and psb_driver_load() exist in correspondence, and psb_driver_unload() should be executed when the psb_do_init() fails to initialize. Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers") Signed-off-by: Hongqi Chen Reviewed-by: Dongliang Mu --- drivers/gpu/drm/gma500/psb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index cd9c73f5a64a..b5a276342129 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -347,7 +347,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) ret = psb_do_init(dev); if (ret) - return ret; + goto out_err; /* Add stolen memory to SGX MMU */ ret = psb_mmu_insert_pfn_sequence(psb_mmu_get_default_pd(dev_priv->mmu), -- 2.25.1