From: Roland Kammerer Date: Mon, 13 Jun 2016 22:26:36 +0000 (+0200) Subject: drbd: get rid of empty statement in is_valid_state X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e526a00467ce18c2262d3a1a5aa9f975034aacb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drbd: get rid of empty statement in is_valid_state This should silence a warning about an empty statement. Thanks to Fabian Frederick who sent a patch I modified to be smaller and avoids an additional indent level. Signed-off-by: Roland Kammerer Signed-off-by: Philipp Reisner Signed-off-by: Jens Axboe --- diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index aca68a581b06..eea0c4aec978 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -814,7 +814,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns) } if (rv <= 0) - /* already found a reason to abort */; + goto out; /* already found a reason to abort */ else if (ns.role == R_SECONDARY && device->open_cnt) rv = SS_DEVICE_IN_USE; @@ -862,6 +862,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns) else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN) rv = SS_CONNECTED_OUTDATES; +out: rcu_read_unlock(); return rv;