diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2023-02-01 21:17:44 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-02-14 14:23:06 -0500 |
commit | d715fa23577cd5d36830c4ecd7e2bfcb4750b351 (patch) | |
tree | 996c4ce089ec9338a118706c219d6866690731e3 /drivers/md/dm-table.c | |
parent | 86a3238c7b9b759cb864f4f768ab2e24687dc0e6 (diff) |
dm: avoid assignment in if conditions
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
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; } |