projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0d5d6e
)
spi/s3c64xx: Check before mem-region release
author
Jassi Brar
<jassi.brar@samsung.com>
Wed, 20 Jan 2010 20:49:44 +0000
(13:49 -0700)
committer
Grant Likely
<grant.likely@secretlab.ca>
Wed, 20 Jan 2010 20:49:44 +0000
(13:49 -0700)
Add precautionary check before releasing memory region.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_s3c64xx.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi_s3c64xx.c
b/drivers/spi/spi_s3c64xx.c
index 3acf38119e96e7b734e023dba91d1f83e7ef9552..0e883f9c720b9d7701f54176f291cb65f004b878 100644
(file)
--- a/
drivers/spi/spi_s3c64xx.c
+++ b/
drivers/spi/spi_s3c64xx.c
@@
-1097,7
+1097,8
@@
static int s3c64xx_spi_remove(struct platform_device *pdev)
iounmap((void *) sdd->regs);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(mem_res->start, resource_size(mem_res));
+ if (mem_res != NULL)
+ release_mem_region(mem_res->start, resource_size(mem_res));
platform_set_drvdata(pdev, NULL);
spi_master_put(master);