summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Novikov <novikov@ispras.ru>2020-07-06 17:53:28 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-07-10 16:17:29 +0200
commit19e55a87ad621b1ccba52ba781d29d97220154de (patch)
treef843bbfef5910b9426975bf81c015a702b5ea598
parentfbdev: da8xx-fb: go to proper label on error handling paths in probe (diff)
downloadlinux-19e55a87ad621b1ccba52ba781d29d97220154de.tar.xz
linux-19e55a87ad621b1ccba52ba781d29d97220154de.zip
fbdev: sm712fb: set error code in probe
If smtcfb_pci_probe() does not detect a valid chip it cleans up everything and returns 0. This can result in various bad things later. The patch sets the error code on the corresponding path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200706155328.8396-1-novikov@ispras.ru
-rw-r--r--drivers/video/fbdev/sm712fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index 8cd655d6d628..bdbe9c68e274 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -1616,7 +1616,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
default:
dev_err(&pdev->dev,
"No valid Silicon Motion display chip was detected!\n");
-
+ err = -ENODEV;
goto failed_fb;
}