From: Aliya Rahmani <aliyarahmani786@gmail.com>
To: clabbe@baylibre.com
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
outreachy@lists.linux.dev, linux-kernel@vger.kernel.org,
Aliya Rahmani <aliyarahmani786@gmail.com>
Subject: [PATCH v3 2/3] staging: media: zoran: else is not generally useful after a break or return
Date: Mon, 18 Apr 2022 22:44:54 +0530 [thread overview]
Message-ID: <20220418171453.16971-3-aliyarahmani786@gmail.com> (raw)
In-Reply-To: <20220418171453.16971-1-aliyarahmani786@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2022-04-18 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 17:14 [PATCH v3 0/3] staging: media: zoran: fix warnings reported by checkpatch Aliya Rahmani
2022-04-18 17:14 ` [PATCH v3 1/3] staging: media: zoran: use seq_puts() instead of seq_printf() Aliya Rahmani
2022-04-18 17:14 ` Aliya Rahmani [this message]
2022-04-18 17:14 ` [PATCH v3 3/3] staging: media: zoran: add parentheses on macro parameter Aliya Rahmani
2022-04-22 14:30 ` [PATCH v3 0/3] staging: media: zoran: fix warnings reported by checkpatch LABBE Corentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220418171453.16971-3-aliyarahmani786@gmail.com \
--to=aliyarahmani786@gmail.com \
--cc=clabbe@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox