diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 04:24:03 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 04:24:03 -0500 |
commit | ed446cc7208d80a7e9ddddc757a4d5767b67b4c7 (patch) | |
tree | 65adfcd1e2d7b2000e5e5983fc69832df7b293d0 /drivers/mtd/nand | |
parent | 24542257a3b987025d4b998ec2d15e556c98ad3f (diff) | |
parent | e423c90a6520d704cd885d742b499dfd6b0f6277 (diff) |
Merge MTD updates into -next
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 3f09f2e9aeb4..57562c85cc8c 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1622,6 +1622,8 @@ static int alloc_nand_resource(struct platform_device *pdev) | |||
1622 | int ret, irq, cs; | 1622 | int ret, irq, cs; |
1623 | 1623 | ||
1624 | pdata = dev_get_platdata(&pdev->dev); | 1624 | pdata = dev_get_platdata(&pdev->dev); |
1625 | if (pdata->num_cs <= 0) | ||
1626 | return -ENODEV; | ||
1625 | info = devm_kzalloc(&pdev->dev, sizeof(*info) + (sizeof(*mtd) + | 1627 | info = devm_kzalloc(&pdev->dev, sizeof(*info) + (sizeof(*mtd) + |
1626 | sizeof(*host)) * pdata->num_cs, GFP_KERNEL); | 1628 | sizeof(*host)) * pdata->num_cs, GFP_KERNEL); |
1627 | if (!info) | 1629 | if (!info) |