From: Greg Kroah-Hartman Date: Sun, 24 Jan 2016 01:36:00 +0000 (-0800) Subject: greybus: svc: return proper error code on watchdog create error X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~755 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=539d6e11d266bceb597bc416060f9f2888bbd89f;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index fc5747031721..9df3c7a4bb82 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -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;