diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 01:24:03 -0800 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 01:24:03 -0800 |
commit | ed446cc7208d80a7e9ddddc757a4d5767b67b4c7 (patch) | |
tree | 65adfcd1e2d7b2000e5e5983fc69832df7b293d0 /drivers/mtd | |
parent | 24542257a3b987025d4b998ec2d15e556c98ad3f (diff) | |
parent | e423c90a6520d704cd885d742b499dfd6b0f6277 (diff) | |
download | linux-ed446cc7208d80a7e9ddddc757a4d5767b67b4c7.tar.bz2 |
Merge MTD updates into -next
Diffstat (limited to 'drivers/mtd')
-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) int ret, irq, cs; pdata = dev_get_platdata(&pdev->dev); + if (pdata->num_cs <= 0) + return -ENODEV; info = devm_kzalloc(&pdev->dev, sizeof(*info) + (sizeof(*mtd) + sizeof(*host)) * pdata->num_cs, GFP_KERNEL); if (!info) |