diff options
author | Anton Vasilyev <vasilyev@ispras.ru> | 2017-08-13 00:45:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 18:25:43 +0300 |
commit | ed779b275b27bea231dae0aebd048d72ff5a010d (patch) | |
tree | 746eb6dda075ce2536ad5ba5b4565db922c491be /drivers/parport | |
parent | df4c756e5f6bf08bd7bc63bbfd7fa921a855f241 (diff) | |
download | linux-ed779b275b27bea231dae0aebd048d72ff5a010d.tar.xz |
parport: use release_mem_region instead of release_resource
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>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/parport_ax88796.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c index 8f8c9f3aa691..2fc91edb058d 100644 --- a/drivers/parport/parport_ax88796.c +++ b/drivers/parport/parport_ax88796.c @@ -358,8 +358,7 @@ static int parport_ax88796_probe(struct platform_device *pdev) exit_unmap: iounmap(dd->base); exit_res: - release_resource(dd->io); - kfree(dd->io); + release_mem_region(dd->io->start, size); exit_mem: kfree(dd); return ret; @@ -373,8 +372,7 @@ static int parport_ax88796_remove(struct platform_device *pdev) free_irq(p->irq, p); parport_remove_port(p); iounmap(dd->base); - release_resource(dd->io); - kfree(dd->io); + release_mem_region(dd->io->start, resource_size(dd->io)); kfree(dd); return 0; |