lkml.org 
[lkml]   [2022]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] staging: media: zoran: Code cleanup - else is not generally useful after a break or return
Just say concisely what you did in the subject line.  For example, "remove
unneeded else". The reader can wait to see the message to find out the
details. "Code cleanup" takes up a lot of space, and doesn't give much
information.

On Mon, 18 Apr 2022, Aliya Rahmani wrote:

> Remove the else without affecting the logic. Fixes the checkpatch warning: else is not generally useful after a break or return

Commit log messages should be limited to around 70 characters per line.

julia

> Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
> ---
> drivers/staging/media/zoran/videocodec.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c
> index 16a1f23a7f19..19732a47c8bd 100644
> --- a/drivers/staging/media/zoran/videocodec.c
> +++ b/drivers/staging/media/zoran/videocodec.c
> @@ -98,9 +98,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master)
>
> h->attached += 1;
> return codec;
> - } else {
> - kfree(codec);
> }
> + kfree(codec);
> }
> h = h->next;
> }
> --
> 2.25.1
>
>
>

\
 
 \ /
  Last update: 2022-04-18 14:12    [W:0.060 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site