Messages in this thread Patch in this message |  | | Subject | [PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment | From | SF Markus Elfring <> | Date | Sat, 1 Oct 2016 09:50:42 +0200 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 1 Oct 2016 08:53:37 +0200
The script "checkpatch.pl" pointed information out like the following.
ERROR: do not use assignment in if condition
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/md/dm-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9b7d8b7..40dde87 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -407,7 +407,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; } -- 2.10.0
|  |