linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] misc: mic: silence uninitialized variable warning
@ 2016-04-13  6:47 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-04-13  6:47 UTC (permalink / raw)
  To: Sudeep Dutt
  Cc: Ashutosh Dixit, Jacek Lawrynowicz, Greg Kroah-Hartman,
	Nikhil Rao, linux-kernel, kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/misc/mic/scif/scif_fence.c b/drivers/misc/mic/scif/scif_fence.c
index 7f2c96f..cac3bcc 100644
--- a/drivers/misc/mic/scif/scif_fence.c
+++ b/drivers/misc/mic/scif/scif_fence.c
@@ -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)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-13  6:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13  6:47 [patch] misc: mic: silence uninitialized variable warning Dan Carpenter

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).