From: Greg Kroah-Hartman Date: Mon, 27 Nov 2017 08:25:51 +0000 (+0100) Subject: staging: fsl-mc-bus: fix build warning X-Git-Tag: v4.19~1691^2~481 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb17be96eed821f60670adf1748afb3d57fe63bb;p=platform%2Fkernel%2Flinux-rpi.git staging: fsl-mc-bus: fix build warning error could be unitialized when it is used as a return value in fsl_mc_device_add(). So fix up the warning by properly setting it. Cc: Laurentiu Tudor Reported-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c index f84bc14c..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; }