diff options
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r-- | arch/arm/plat-s3c/dev-nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c/dev-nand.c b/arch/arm/plat-s3c/dev-nand.c index 84808ccda70e..a52fb6cf618f 100644 --- a/arch/arm/plat-s3c/dev-nand.c +++ b/arch/arm/plat-s3c/dev-nand.c | |||
@@ -58,8 +58,8 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set) | |||
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | } | 59 | } |
60 | 60 | ||
61 | size = sizeof(int) * set->nr_chips; | 61 | if (set->nr_map && set->nr_chips) { |
62 | if (size) { | 62 | size = sizeof(int) * set->nr_chips; |
63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); | 63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); |
64 | set->nr_map = ptr; | 64 | set->nr_map = ptr; |
65 | 65 | ||