Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 365ab499 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe
Browse files

fs/ntfs3: remove unnecessary NULL check

This code triggers a Smatch warning:

    fs/ntfs3/fsntfs.c:1606 ntfs_bio_fill_1()
    warn: variable dereferenced before check 'bio' (see line 1591)

The "bio" pointer cannot be NULL so there is no need to check.
Originally there was more extensive NULL checking but it was removed
because bio_alloc() will never fail if it is allowed to sleep.

Remove this check as well.

Fixes: 39146b6f

 ("ntfs3: remove ntfs_alloc_bio")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220128140922.GA29766@kili


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 455a844d
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment