Thread (2 messages) flat view 2 messages, 2 authors, 2021-05-21
STALE1935d

[PATCH] hgafb: fix probe function

From: Dan Carpenter <hidden>
Date: 2021-05-17 08:52:48
Also in: dri-devel, kernel-janitors
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

There is a reversed if statement in this probe function so the driver is
completely broken.

Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference")
Signed-off-by: Dan Carpenter <redacted>
---
 drivers/video/fbdev/hgafb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c
index cc8e62ae93f6..bd3d07aa4f0e 100644
--- a/drivers/video/fbdev/hgafb.c
+++ b/drivers/video/fbdev/hgafb.c
@@ -558,7 +558,7 @@ static int hgafb_probe(struct platform_device *pdev)
 	int ret;
 
 	ret = hga_card_detect();
-	if (!ret)
+	if (ret)
 		return ret;
 
 	printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n",
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help