summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2020-05-27 11:06:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 12:24:46 +0200
commit2c069b61a843dc9c3d2296b54c4baa9730286530 (patch)
treeaa7bdd73eca08f2eff541c295a019c8d183aac4e /drivers/staging/most
parentffd069ec04238119f5d4884406b403c599b6eeec (diff)
staging: most: usb: return 0 instead of variable
This patch returns 0 instead of variable in case of invalid parameter has been passed to function to increase readability. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/usb/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c
index 64005b649794..a605e0f2028a 100644
--- a/drivers/staging/most/usb/usb.c
+++ b/drivers/staging/most/usb/usb.c
@@ -192,12 +192,12 @@ static inline int start_sync_ep(struct usb_device *usb_dev, u16 ep)
static unsigned int get_stream_frame_size(struct device *dev,
struct most_channel_config *cfg)
{
- unsigned int frame_size = 0;
+ unsigned int frame_size;
unsigned int sub_size = cfg->subbuffer_size;
if (!sub_size) {
dev_warn(dev, "Misconfig: Subbuffer size zero.\n");
- return frame_size;
+ return 0;
}
switch (cfg->data_type) {
case MOST_CH_ISOC: