[PATCH 04/10] staging: most: usb: return 0 instead of variable
Christian Gromm
christian.gromm at microchip.com
Wed May 27 09:06:21 UTC 2020
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 at microchip.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
---
drivers/staging/most/usb/usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c
index 64005b6..a605e0f 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:
--
2.7.4
More information about the devel
mailing list