Commit 2c069b61 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-5-git-send-email-christian.gromm@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ffd069ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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: