misc: qpnp: Initialize the variable to avoid junk value assign
Fix 'maybe uninitialized' warning by initializing temp value.
"warning: 'temp' may be used uninitialized in this
function [-Wmaybe-uninitialized]"
Change-Id: I48de4005f6bb6f5398a9221c09820c695c30e675
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
diff --git a/drivers/misc/qpnp-misc.c b/drivers/misc/qpnp-misc.c
index 3c11de0..690b28b 100644
--- a/drivers/misc/qpnp-misc.c
+++ b/drivers/misc/qpnp-misc.c
@@ -135,7 +135,7 @@
struct qpnp_misc_dev *mdev = NULL;
struct qpnp_misc_dev *mdev_found = NULL;
int rc;
- u8 temp;
+ u8 temp = 0;
if (IS_ERR_OR_NULL(node)) {
pr_err("Invalid device node pointer\n");