* [PATCH] staging: most: usb: init return value in default path of switch/case expression
@ 2020-05-28 12:41 Christian Gromm
0 siblings, 0 replies; only message in thread
From: Christian Gromm @ 2020-05-28 12:41 UTC (permalink / raw)
To: gregkh; +Cc: driverdev-devel, linux-usb, Christian Gromm
This patch avoids returning an uninitialized value in the default
path of the switch expression.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/staging/most/usb/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c
index df5876c..2640c5b 100644
--- a/drivers/staging/most/usb/usb.c
+++ b/drivers/staging/most/usb/usb.c
@@ -215,6 +215,7 @@ static unsigned int get_stream_frame_size(struct device *dev,
break;
default:
dev_warn(dev, "Query frame size of non-streaming channel\n");
+ frame_size = 0;
break;
}
return frame_size;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-28 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 12:41 [PATCH] staging: most: usb: init return value in default path of switch/case expression Christian Gromm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).