summaryrefslogtreecommitdiff
path: root/drivers/md/dm-stats.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2023-02-01 21:17:44 +0100
committerMike Snitzer <snitzer@kernel.org>2023-02-14 14:23:06 -0500
commitd715fa23577cd5d36830c4ecd7e2bfcb4750b351 (patch)
tree996c4ce089ec9338a118706c219d6866690731e3 /drivers/md/dm-stats.c
parent86a3238c7b9b759cb864f4f768ab2e24687dc0e6 (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-stats.c')
-rw-r--r--drivers/md/dm-stats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c
index 1a94fb0e44f1..b738f565bf5a 100644
--- a/drivers/md/dm-stats.c
+++ b/drivers/md/dm-stats.c
@@ -1046,7 +1046,8 @@ static int message_stats_create(struct mapped_device *md,
else if (!strncasecmp(a, "histogram:", 10)) {
if (n_histogram_entries)
goto ret_einval;
- if ((r = parse_histogram(a + 10, &n_histogram_entries, &histogram_boundaries)))
+ r = parse_histogram(a + 10, &n_histogram_entries, &histogram_boundaries);
+ if (r)
goto ret;
} else
goto ret_einval;