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/nand | |
parent | 24542257a3b987025d4b998ec2d15e556c98ad3f (diff) | |
parent | e423c90a6520d704cd885d742b499dfd6b0f6277 (diff) | |
download | op-kernel-dev-ed446cc7208d80a7e9ddddc757a4d5767b67b4c7.zip op-kernel-dev-ed446cc7208d80a7e9ddddc757a4d5767b67b4c7.tar.gz |
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 3f09f2e..57562c8 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) |