diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-27 20:20:16 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-03-29 11:05:05 +0300 |
commit | 4e99c98e3071bd7fd4d7f20440f1a5c3bf533149 (patch) | |
tree | ed56fbeb01367568d7255e3106897402d2ce8710 /drivers/thunderbolt/nhi.c | |
parent | ebde5ba27c640e08e92c83fe30be0d9fa224eea9 (diff) | |
download | lwn-4e99c98e3071bd7fd4d7f20440f1a5c3bf533149.tar.gz lwn-4e99c98e3071bd7fd4d7f20440f1a5c3bf533149.zip |
thunderbolt: Get rid of redundant 'else'
In the snippets like the following
if (...)
return / goto / break / continue ...;
else
...
the 'else' is redundant. Get rid of it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/nhi.c')
-rw-r--r-- | drivers/thunderbolt/nhi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 4dce2edd86ea..4400e1383e3e 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -515,7 +515,8 @@ static int nhi_alloc_hop(struct tb_nhi *nhi, struct tb_ring *ring) ring->hop); ret = -EBUSY; goto err_unlock; - } else if (!ring->is_tx && nhi->rx_rings[ring->hop]) { + } + if (!ring->is_tx && nhi->rx_rings[ring->hop]) { dev_warn(&nhi->pdev->dev, "RX hop %d already allocated\n", ring->hop); ret = -EBUSY; |