Title: [7479] branches/2009R1/drivers/spi/spi_bfin5xx.c: The error handling code may access NULL pointer if chip is NULL.
Revision
7479
Author
adamliyi
Date
2009-09-28 00:03:38 -0400 (Mon, 28 Sep 2009)

Log Message

The error handling code may access NULL pointer if chip is NULL.

Modified Paths


Diff

Modified: branches/2009R1/drivers/spi/spi_bfin5xx.c (7478 => 7479)


--- branches/2009R1/drivers/spi/spi_bfin5xx.c	2009-09-28 03:16:01 UTC (rev 7478)
+++ branches/2009R1/drivers/spi/spi_bfin5xx.c	2009-09-28 04:03:38 UTC (rev 7479)
@@ -1240,6 +1240,9 @@
 
  error:
 	if (ret) {
+		if (!chip)
+			return ret;
+
 		if (drv_data->dma_requested)
 			free_dma(drv_data->dma_channel);
 		drv_data->dma_requested = 0;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to