Commit 98904f3d authored by Daniel Vetter's avatar Daniel Vetter

drm/repaper: Use devm_drm_dev_alloc

Already using devm_drm_dev_init, so very simple replacment.
Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-16-daniel.vetter@ffwll.ch
parent e20b8738
......@@ -1002,19 +1002,13 @@ static int repaper_probe(struct spi_device *spi)
}
}
epd = kzalloc(sizeof(*epd), GFP_KERNEL);
if (!epd)
return -ENOMEM;
epd = devm_drm_dev_alloc(dev, &repaper_driver,
struct repaper_epd, drm);
if (IS_ERR(epd))
return PTR_ERR(epd);
drm = &epd->drm;
ret = devm_drm_dev_init(dev, drm, &repaper_driver);
if (ret) {
kfree(epd);
return ret;
}
drmm_add_final_kfree(drm, epd);
ret = drmm_mode_config_init(drm);
if (ret)
return ret;
......
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