lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2566074.m8COktZgTy@avalon>
Date:	Tue, 18 Jun 2013 14:31:58 +0200
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	linux-sh@...r.kernel.org, Magnus Damm <magnus.damm@...il.com>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH] clocksource: sh_cmt: Use devm_* managed helpers

Hi Sachin,

On Tuesday 18 June 2013 17:13:37 Sachin Kamat wrote:
> On 18 June 2013 16:29, Laurent Pinchart wrote:
> > This simplifies the main error path by getting rid of it.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@...asonboard.com>
> > ---
> > 
> >  drivers/clocksource/sh_cmt.c | 40 ++++++++++++++-------------------------
> >  1 file changed, 14 insertions(+), 26 deletions(-)
> > 
> > The patch is based on top of renesas-next-20130618 plus Magnus'
> > "clocksource: sh_cmt: 32-bit control register support" patch.
> > 
> > diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
> > index 0965e98..7001e4d 100644
> > --- a/drivers/clocksource/sh_cmt.c
> > +++ b/drivers/clocksource/sh_cmt.c

[snip]

> > @@ -703,23 +701,23 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,
> > struct platform_device *pdev)> 
> >         irq = platform_get_irq(p->pdev, 0);
> >         if (irq < 0) {
> >                 dev_err(&p->pdev->dev, "failed to get irq\n");
> > -               goto err0;
> > +               return -ENXIO;
> >         }
> >         
> >         /* map memory, let mapbase point to our channel */
> > -       p->mapbase = ioremap_nocache(res->start, resource_size(res));
> > +       p->mapbase = devm_ioremap_resource(&pdev->dev, res);
> >         if (p->mapbase == NULL) {
> 
> You should check for  IS_ERR (p->mapbase) and return PTR_ERR(p->mapbase)
> 
> >                 dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
> 
> This error message is not required as devm_ioremap_resource prints its own.

Oops, my bad. I'll fix that and resubmit.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ