diff options
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 455d7303e278..cf1b43724fc5 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -374,7 +374,8 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, if (!dd) return -ENOMEM; - if ((r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev))) { + r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev); + if (r) { kfree(dd); return r; } |