OMAP: SPI: Fix the trying to free nonexistent resource error
authorShubhrajyoti D <shubhrajyoti@ti.com>
Mon, 24 Oct 2011 10:24:24 +0000 (15:24 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:43:37 +0000 (09:43 -0800)
commit52e17e7874e216526d84af50f4661aa2cb7413c0
treed2b3a835bbc507110c54f12f6eb17ed3249823c4
parent76c125d2658e301689c0b812977eebbef17d8c0c
OMAP: SPI: Fix the trying to free nonexistent resource error

commit 1458d160de3f1862aeaac57447ba96e7857ac52b upstream.

Currently there is a request_mem_region(r->start, ..
followed by r->start += pdata->regs_offset;

And then in remove

   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   release_mem_region(r->start, resource_size(r));

Here the offset addition is not taken care. Fix the code for the
same.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/spi/spi-omap2-mcspi.c