On 6/4/19 8:27 AM, Colin King wrote:
> From: Colin Ian King <[email protected]>
> 
> 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

Reply via email to