summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-12-29 06:37:03 +0100
committerOlof Johansson <olof@lixom.net>2013-12-29 06:38:16 +0100
commitfe5a365cdb9cc925d5ce86a5bb4509dca57f3894 (patch)
tree8dd536be0e16e86109295142edd1ef1fd18c2e98 /drivers/md/dm-table.c
parentMerge tag 'tegra-for-3.14-defconfig-2' of git://git.kernel.org/pub/scm/linux/... (diff)
parentLinux 3.13-rc5 (diff)
downloadlinux-fe5a365cdb9cc925d5ce86a5bb4509dca57f3894.tar.xz
linux-fe5a365cdb9cc925d5ce86a5bb4509dca57f3894.zip
Merge tag 'v3.13-rc5' into next/boards
Need a newer base version to get a regulator fix for Samsung platforms that they enable building in a defconfig. Linux 3.13-rc5
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 465f08ca62b1..3ba6a3859ce3 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -200,6 +200,11 @@ int dm_table_create(struct dm_table **result, fmode_t mode,
num_targets = dm_round_up(num_targets, KEYS_PER_NODE);
+ if (!num_targets) {
+ kfree(t);
+ return -ENOMEM;
+ }
+
if (alloc_targets(t, num_targets)) {
kfree(t);
return -ENOMEM;