Re: [PATCH v2] staging: greybus: remove unnecessary goto
From: Greg KH
Date: Wed Oct 21 2026 - 02:21:54 EST
On Tue, Oct 20, 2026 at 04:36:36PM +0000, Haasham Khan wrote:
> 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@xxxxxxxxx>
> ---
> 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;
> }
> --
> 2.53.0
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot