diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 18:34:51 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 18:34:51 -0500 |
commit | 9cdf083f981b8d37b3212400a359368661385099 (patch) | |
tree | aa15a6a08ad87e650dea40fb59b3180bef0d345b /drivers/mtd/devices/mtd_dataflash.c | |
parent | e499e01d234a31d59679b7b1e1cf628d917ba49a (diff) | |
parent | a8b3485287731978899ced11f24628c927890e78 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 10a4f4e263fe..a987e917f4e0 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -459,7 +459,7 @@ add_dataflash(struct spi_device *spi, char *name, | |||
459 | struct mtd_info *device; | 459 | struct mtd_info *device; |
460 | struct flash_platform_data *pdata = spi->dev.platform_data; | 460 | struct flash_platform_data *pdata = spi->dev.platform_data; |
461 | 461 | ||
462 | priv = (struct dataflash *) kzalloc(sizeof *priv, GFP_KERNEL); | 462 | priv = kzalloc(sizeof *priv, GFP_KERNEL); |
463 | if (!priv) | 463 | if (!priv) |
464 | return -ENOMEM; | 464 | return -ENOMEM; |
465 | 465 | ||
@@ -536,7 +536,7 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
536 | if (status <= 0 || status == 0xff) { | 536 | if (status <= 0 || status == 0xff) { |
537 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", | 537 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", |
538 | spi->dev.bus_id, status); | 538 | spi->dev.bus_id, status); |
539 | if (status == 0xff) | 539 | if (status == 0 || status == 0xff) |
540 | status = -ENODEV; | 540 | status = -ENODEV; |
541 | return status; | 541 | return status; |
542 | } | 542 | } |