summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-03-17 17:47:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-23 17:25:22 +0100
commit3056a5cafa3cf83c7c83d3fb4029707888d4bb63 (patch)
treedec82966a382cc61d7ddd014471d91facde95719 /drivers/usb/host
parent85052fdb40a0eb2278d10f016ce12de00672bba9 (diff)
downloadlinux-stable-3056a5cafa3cf83c7c83d3fb4029707888d4bb63.tar.gz
linux-stable-3056a5cafa3cf83c7c83d3fb4029707888d4bb63.tar.bz2
linux-stable-3056a5cafa3cf83c7c83d3fb4029707888d4bb63.zip
xhci: mem: Drop useless return:s
When function returns void and we have if-else-if chain, there is no need to explicitly call return. Drop them and indent lines better. While at it, make if-chain sorted from testing bigger values to smaller. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20230317154715.535523-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-mem.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 357883256a5a..fa0c4ac2ca7f 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -544,14 +544,11 @@ static void xhci_free_stream_ctx(struct xhci_hcd *xhci,
size_t size = sizeof(struct xhci_stream_ctx) * num_stream_ctxs;
if (size > MEDIUM_STREAM_ARRAY_SIZE)
- dma_free_coherent(dev, size,
- stream_ctx, dma);
- else if (size <= SMALL_STREAM_ARRAY_SIZE)
- return dma_pool_free(xhci->small_streams_pool,
- stream_ctx, dma);
+ dma_free_coherent(dev, size, stream_ctx, dma);
+ else if (size > SMALL_STREAM_ARRAY_SIZE)
+ dma_pool_free(xhci->medium_streams_pool, stream_ctx, dma);
else
- return dma_pool_free(xhci->medium_streams_pool,
- stream_ctx, dma);
+ dma_pool_free(xhci->small_streams_pool, stream_ctx, dma);
}
/*