Message ID | 1576850726-5684-1-git-send-email-wuxu.wu@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/nouveau/bios: fix incorrect kfree in platform_init | expand |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c index 9b91da0..d776e01 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c @@ -70,8 +70,9 @@ pcirom_init(struct nvkm_bios *bios, const char *name) (priv->rom = pci_map_rom(pdev, &priv->size))) { priv->pdev = pdev; return priv; + } else { + kfree(priv); } - kfree(priv); } pci_disable_rom(pdev); }