Remove the conditional jump to gb_error, as both success and error paths proceed to free the request and return the result.
This simplifies the control flow without changing the function's behavior.
Signed-off-by: Haasham Khan haasham93@gmail.com --- drivers/staging/greybus/loopback.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index efc69c10cffe..284935fded12 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -609,10 +609,6 @@ static int gb_loopback_async_transfer(struct gb_loopback *gb, u32 len) request, len + sizeof(*request), len + response_len, gb_loopback_async_transfer_complete); - if (retval) - goto gb_error; - -gb_error: kfree(request); return retval; }