From: Josh Law <hlcj1234567@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ovidiu Panait <ovidiu.panait.oss@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Josh Law <objecting@objecting.org>
Subject: [PATCH 3/4] staging: axis-fifo: remove unnecessary variable initializations
Date: Sun, 1 Mar 2026 15:53:17 +0000 [thread overview]
Message-ID: <20260301155318.2596519-3-objecting@objecting.org> (raw)
In-Reply-To: <20260301155318.2596519-1-objecting@objecting.org>
Remove the unnecessary initialization of 'fifo' to NULL and 'rc' to 0
in axis_fifo_probe(), as both variables are assigned before their first
use.
Signed-off-by: Josh Law <objecting@objecting.org>
---
drivers/staging/axis-fifo/axis-fifo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index e154139831ea..7ca0404b0875 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -456,8 +456,8 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
static int axis_fifo_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct axis_fifo *fifo = NULL;
- int rc = 0; /* error return value */
+ struct axis_fifo *fifo;
+ int rc;
int irq;
fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL);
--
2.43.0
next prev parent reply other threads:[~2026-03-01 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 15:53 [PATCH 1/4] staging: axis-fifo: fix grammar in Kconfig help text Josh Law
2026-03-01 15:53 ` [PATCH 2/4] staging: axis-fifo: use lowercase hex constant for consistency Josh Law
2026-03-01 15:53 ` Josh Law [this message]
2026-03-01 15:53 ` [PATCH 4/4] staging: axis-fifo: simplify error returns in axis_fifo_parse_dt() Josh Law
2026-03-01 18:46 ` [PATCH 1/4] staging: axis-fifo: fix grammar in Kconfig help text Ethan Tidmore
2026-03-01 18:54 ` Josh Law
2026-03-01 21:27 ` Ethan Tidmore
2026-03-01 23:49 ` Bagas Sanjaya
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=20260301155318.2596519-3-objecting@objecting.org \
--to=hlcj1234567@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=objecting@objecting.org \
--cc=ovidiu.panait.oss@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.