Remove the else without affecting the logic. Fixes the following checkpatch warning: else is not generally useful after a break or return Signed-off-by: Aliya Rahmani <aliyarahmani786@xxxxxxxxx> --- changes since v2: Rework commit description and subject --- 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