Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494377
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment |
| Date | 2016-10-01 10:00 +0200 |
| Message-ID | <snnnb-5jc-3@gated-at.bofh.it> (permalink) |
| References | <snndv-5fs-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] md/dm-table: Fine-tuning for several function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 09:50 +0200 [PATCH 9/9] md/dm-table: Delete an unwanted space in dm_table_get_integrity_disk() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200 [PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200 [PATCH 8/9] md/dm-table: Delete an unwanted space in high() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200
csiph-web