mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpu: gma500: psb_drv: add missing unwind goto
@ 2023-04-17  6:01 Hongqi Chen
  2023-04-17  6:37 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Hongqi Chen @ 2023-04-17  6:01 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter, Dave Airlie, Alan Cox
  Cc: hust-os-kernel-patches, Hongqi Chen, Dongliang Mu, dri-devel,
	linux-kernel

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 <U202112190@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-17  6:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17  6:01 [PATCH] gpu: gma500: psb_drv: add missing unwind goto Hongqi Chen
2023-04-17  6:37 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®