lkml.org 
[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: fsl-mc: fix uninitialized variable use
Date
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Fix this warning triggering on a powerpc build:
warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index f84bc14..f15bab3 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -570,6 +570,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
mc_dev->dev.release = fsl_mc_device_release;
mc_dev->dev.type = fsl_mc_get_device_type(obj_desc->type);
if (!mc_dev->dev.type) {
+ error = -ENODEV;
dev_err(parent_dev, "unknown device type %s\n", obj_desc->type);
goto error_cleanup_dev;
}
--
2.9.4
\
 
 \ /
  Last update: 2017-11-27 10:01    [W:0.078 / U:42.936 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site