greybus: loopback: return the right error value

If an error occurs starting up the loopback thread, the error code
is not extracted properly.  Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Alex Elder 2015-05-11 21:16:35 -05:00 committed by Greg Kroah-Hartman
parent a04c640e5c
commit 69f6034792

View file

@ -362,7 +362,7 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
gb_loopback_reset_stats(gb);
gb->task = kthread_run(gb_loopback_fn, gb, "gb_loopback");
if (IS_ERR(gb->task)) {
retval = IS_ERR(gb->task);
retval = PTR_ERR(gb->task);
goto error;
}