hgafb: fix probe function
Subsystems (2)
PATCH 1/1 hgafb: fix probe function
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 <[email protected]>
--- drivers/video/fbdev/hgafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/hgafb.c +1 -1
@@ -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",
Signature · 1 line
2.30.2
Quoted 25 lines · Dan Carpenter
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 <[email protected]>--- drivers/video/fbdev/hgafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/hgafb.c +1
-1@@ -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",Signature · 1 line
2.30.2
Someone _just_ beat you to this:
https://lore.kernel.org/r/[email protected]
I'll add your s-o-b to that one as it's identical to yours.
thanks,
greg k-h