Commit 19e55a87 authored by Evgeny Novikov's avatar Evgeny Novikov Committed by Bartlomiej Zolnierkiewicz

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: default avatarEvgeny Novikov <novikov@ispras.ru>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200706155328.8396-1-novikov@ispras.ru
parent 80a00e90
...@@ -1616,7 +1616,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev, ...@@ -1616,7 +1616,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
default: default:
dev_err(&pdev->dev, dev_err(&pdev->dev,
"No valid Silicon Motion display chip was detected!\n"); "No valid Silicon Motion display chip was detected!\n");
err = -ENODEV;
goto failed_fb; goto failed_fb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment