From: Satish <x0124230@xxxxxx> Fix Null pointer check for pointer r in omap2_mcspi_remove() function. Signed-off-by: Satish Kumar <x0124230@xxxxxx> Signed-off-by: Manjunatha GK <manjugk@xxxxxx> Cc: Tony Lindgren <tony@xxxxxxxxxxx> --- drivers/spi/omap2_mcspi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index e0de0d0..a95d306 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -1198,6 +1198,8 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev) clk_put(mcspi->ick); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (r == NULL) + return -EINVAL; release_mem_region(r->start, (r->end - r->start) + 1); base = mcspi->base; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html