All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] io-wq: remove redundant initialization of variable ret
@ 2021-06-15 14:34 Colin King
  2021-06-15 21:38 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-06-15 14:34 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov, io-uring; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable ret is being initialized with a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/io-wq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io-wq.c b/fs/io-wq.c
index 2c37776c0280..e221aaab585c 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -896,7 +896,7 @@ static int io_wqe_hash_wake(struct wait_queue_entry *wait, unsigned mode,
 
 struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
 {
-	int ret = -ENOMEM, node;
+	int ret, node;
 	struct io_wq *wq;
 
 	if (WARN_ON_ONCE(!data->free_work || !data->do_work))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] io-wq: remove redundant initialization of variable ret
  2021-06-15 14:34 [PATCH] io-wq: remove redundant initialization of variable ret Colin King
@ 2021-06-15 21:38 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-06-15 21:38 UTC (permalink / raw)
  To: Colin King, Pavel Begunkov, io-uring; +Cc: kernel-janitors, linux-kernel

On 6/15/21 8:34 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being initialized with a value that is never read, the
> assignment is redundant and can be removed.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-15 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 14:34 [PATCH] io-wq: remove redundant initialization of variable ret Colin King
2021-06-15 21:38 ` Jens Axboe

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.