Yet one more nitpick On Thu, 7 Feb 2013, Albert Wang wrote: > This patch switchs to resource managed allocation and request in mmp-driver. > It can remove free resource operations. > > Signed-off-by: Albert Wang <twang13@xxxxxxxxxxx> > Signed-off-by: Libin Yang <lbyang@xxxxxxxxxxx> > Acked-by: Jonathan Corbet <corbet@xxxxxxx> > --- > drivers/media/platform/marvell-ccic/mmp-driver.c | 65 ++++++++-------------- > 1 file changed, 22 insertions(+), 43 deletions(-) > > diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c > index 818abf3..d355840 100755 > --- a/drivers/media/platform/marvell-ccic/mmp-driver.c > +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c [snip] > @@ -374,14 +373,12 @@ static int mmpcam_probe(struct platform_device *pdev) > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > if (res == NULL) { > dev_err(&pdev->dev, "no iomem resource!\n"); > - ret = -ENODEV; > - goto out_free; > + return -ENODEV; > } > - mcam->regs = ioremap(res->start, resource_size(res)); > + mcam->regs = devm_request_and_ioremap(&pdev->dev, res); Don't kill me, but they've recently invented devm_ioremap_resource(), which is essentially the same as devm_request_and_ioremap(), but also returns an error code and prints an error message, so, you wouldn't have to invent -ENODEV yourself and you don't need the dev_err() below. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html