]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ntfs3: remove unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Jan 2022 14:09:22 +0000 (17:09 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Feb 2022 14:50:55 +0000 (07:50 -0700)
commit47f81e84a37aa09d485829e5c28f74ce0585c53d
tree307d87ca8c7dfbc21a5573bf83b167cd761033c6
parent0212dc97483c0fe79b857d1b0851dbb167209658
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: a5b1033f9fa1 ("ntfs3: remove ntfs_alloc_bio")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220128140922.GA29766@kili
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/ntfs3/fsntfs.c