Skip to contentSkip to conversation

staging: most: usb: init return value in default path of switch/case expression

PATCH New Christian Gromm 1 participant 1 message May 28, 2020

Subsystems (3)
lore
Share & tools
lore

Christian Gromm

author maintainer
#0 lore raw

PATCH 1/1 staging: most: usb: init return value in default path of switch/case expression

This patch avoids returning an uninitialized value in the default path of the switch expression.

---
 drivers/staging/most/usb/usb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/most/usb/usb.c +1 -0
index df5876c..2640c5b 100644
@@ -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;
Signature · 1 line
2.7.4