Commit a5808add authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: call put_device() on error

As soon as we've called device_initialize() we're required to call
put_device() in order to drop our reference to the device structure.
This was missed in the error path in greybus_new_module().  Fix that.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent badad68e
......@@ -440,6 +440,7 @@ struct greybus_device *greybus_new_module(struct device *parent,
return gdev;
error:
put_device(&gdev->dev);
greybus_module_release(&gdev->dev);
return NULL;
}
......
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