Re: [PATCH 2/5] watchdog: another ioremap() fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 19, 2008 at 12:06:53AM +0100, Russell King - ARM Linux wrote:
> On Fri, Sep 19, 2008 at 01:23:39AM +0300, Felipe Balbi wrote:
> > @@ -359,6 +364,8 @@ fail:
> >  			clk_put(wdev->mpu_wdt_ick);
> >  		if (wdev->mpu_wdt_fck)
> >  			clk_put(wdev->mpu_wdt_fck);
> > +		if (wdev->base)
> > +			iounmap(wdev->base);
> >  		kfree(wdev);
> >  	}
> >  	if (mem) {
> > @@ -396,6 +403,9 @@ static int omap_wdt_remove(struct platform_device *pdev)
> >  		clk_put(wdev->mpu_wdt_fck);
> >  		wdev->mpu_wdt_fck = NULL;
> >  	}
> > +	if (wdev->base)
> > +		iounmap(wdev->base);
> > +
> 
> For both of these... iounmap on NULL pointers is allowed, so the
> test is redundant.

Good to know. Thanks

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux