From: Markus Elfring <[email protected]>
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 <[email protected]>
---
 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

Reply via email to