* [PATCH] i2c: use release_mem_region instead of release_resource
@ 2017-08-10 15:15 Anton Vasilyev
2017-08-14 19:37 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Anton Vasilyev @ 2017-08-10 15:15 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Anton Vasilyev, linux-i2c, linux-kernel, ldv-project
Use api pair of request_mem_region and release_mem_region
instead of release_resource.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
---
drivers/i2c/busses/i2c-simtec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
index b4685bb..adca51a 100644
--- a/drivers/i2c/busses/i2c-simtec.c
+++ b/drivers/i2c/busses/i2c-simtec.c
@@ -127,8 +127,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
iounmap(pd->reg);
err_res:
- release_resource(pd->ioarea);
- kfree(pd->ioarea);
+ release_mem_region(pd->ioarea->start, size);
err:
kfree(pd);
@@ -142,8 +141,7 @@ static int simtec_i2c_remove(struct platform_device *dev)
i2c_del_adapter(&pd->adap);
iounmap(pd->reg);
- release_resource(pd->ioarea);
- kfree(pd->ioarea);
+ release_mem_region(pd->ioarea->start, resource_size(pd->ioarea));
kfree(pd);
return 0;
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: use release_mem_region instead of release_resource
2017-08-10 15:15 [PATCH] i2c: use release_mem_region instead of release_resource Anton Vasilyev
@ 2017-08-14 19:37 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2017-08-14 19:37 UTC (permalink / raw)
To: Anton Vasilyev; +Cc: linux-i2c, linux-kernel, ldv-project
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
On Thu, Aug 10, 2017 at 06:15:45PM +0300, Anton Vasilyev wrote:
> Use api pair of request_mem_region and release_mem_region
> instead of release_resource.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 19:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 15:15 [PATCH] i2c: use release_mem_region instead of release_resource Anton Vasilyev
2017-08-14 19:37 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®