Commit fb17be96 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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 <laurentiu.tudor@nxp.com>
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19e2be77
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment