mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
fbdev: sm712fb: handle ioremap() errors in probe
smtcfb_pci_probe() does not handle ioremap() errors for case 0x720. The patch fixes that exactly like for case 0x710/2. 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/20200713080532.15504-1-novikov@ispras.ru
This commit is contained in:
parent
a49145acfb
commit
bcee1609ba
@ -1604,6 +1604,14 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
|
||||
sfb->fb->fix.mmio_start = mmio_base;
|
||||
sfb->fb->fix.mmio_len = 0x00200000;
|
||||
sfb->dp_regs = ioremap(mmio_base, 0x00200000 + smem_size);
|
||||
if (!sfb->dp_regs) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: unable to map memory mapped IO!\n",
|
||||
sfb->fb->fix.id);
|
||||
err = -ENOMEM;
|
||||
goto failed_fb;
|
||||
}
|
||||
|
||||
sfb->lfb = sfb->dp_regs + 0x00200000;
|
||||
sfb->mmio = (smtc_regbaseaddress =
|
||||
sfb->dp_regs + 0x000c0000);
|
||||
|
Loading…
Reference in New Issue
Block a user