[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f834f32d-ab6e-c429-1a3e-13512583ee08@kernel.dk>
Date: Tue, 4 Jun 2019 09:43:28 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Colin King <colin.king@...onical.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, linux-block@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] blktrace: remove redundant assignment to ret
On 6/4/19 8:27 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Variable ret is being assigned a value that is never read, hence
> the assignment is redundant and can be removed.
This doesn't look correct to me, here's the full code:
ret = -ENOENT;
dir = debugfs_lookup(buts->name, blk_debugfs_root);
if (!dir)
bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);
if (!dir)
goto err;
[...]
err:
[...]
return ret;
The main issue here, to me, looks like we're not dealing with ERR_PTR
returns from debugfs_create_dir(), just checking for NULL.
--
Jens Axboe
Powered by blists - more mailing lists