Skip to contentSkip to conversation

misc: mic: silence uninitialized variable warning

PATCH New Dan Carpenter 1 participant 1 message Apr 13, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: mic: silence uninitialized variable warning

My static checker complains that we still use "mark" even when the _scif_fence_mark() call fails so it can be uninitialized.

drivers/misc/mic/scif/scif_fence.c +2 -1
index 7f2c96f..cac3bcc 100644
@@ -27,7 +27,8 @@
 void scif_recv_mark(struct scif_dev *scifdev, struct scifmsg *msg)
 {
 	struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0];
-	int mark, err;
+	int mark = 0;
+	int err;
 
 	err = _scif_fence_mark(ep, &mark);
 	if (err)