[PATCH 1/3] DRM: ingenic: Use devm_platform_ioremap_resource
Sam Ravnborg
sam at ravnborg.org
Sun Jun 30 20:56:55 UTC 2019
Hi Paul.
> > >
> > > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > - base = devm_ioremap_resource(dev, mem);
> > > + base = devm_platform_ioremap_resource(pdev, 0);
> > > if (IS_ERR(base)) {
> > > dev_err(dev, "Failed to get memory resource");
> > Consider to include the error code in the error message here.
>
> I don't think it's needed; a non-zero error code in the probe function will
> have the drivers core automatically print a message with the name of the
> failing driver and the return code.
You are right, I continue to forget this.
So the above is fine.
Sam
More information about the dri-devel
mailing list