greybus: svc: return proper error code on watchdog create error

When the watchdog is not created properly, we need to propagate the
error for this and not just return success.

Reported-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2016-01-23 17:36:00 -08:00
parent ed7279ae31
commit 539d6e11d2

View File

@@ -441,6 +441,7 @@ static int gb_svc_hello(struct gb_operation *op)
dev_err(&svc->dev, "failed to create watchdog: %d\n", ret);
input_unregister_device(svc->input);
device_del(&svc->dev);
return ret;
}
return 0;