2011-02-03 20:25:22

by Julia Lawall

[permalink] [raw]
Subject: request_region/release_resource

Is there any circumstance in which it is ok to call release_resource on
the result of calling request(_mem)_region? One issue is that
release_resource doesn't free its argument, but then what if the call to
release_resource is followed by a call to kfree?

Example:
drivers/watchdog/s3c2410_wdt.c, in the function s3c2410wdt_probe

thanks,
julia


2011-02-04 21:39:22

by Greg KH

[permalink] [raw]
Subject: Re: request_region/release_resource

On Thu, Feb 03, 2011 at 09:25:15PM +0100, Julia Lawall wrote:
> Is there any circumstance in which it is ok to call release_resource on
> the result of calling request(_mem)_region? One issue is that
> release_resource doesn't free its argument, but then what if the call to
> release_resource is followed by a call to kfree?

Ick, not nice things I think :(

Care to fix it up?

thanks,

greg k-h