summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-04-28 21:59:30 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-04-28 21:59:59 +0900
commitd986ba0329dcca102e227995371135c9bbcefb6b (patch)
treee2dba117a8ec710cf78692dddf1953a84caeff70 /include/linux
parent785bc568161d96fdbd4326294d427a48e66fe60f (diff)
ntfs: fix invalid PTR_ERR() usage in __ntfs_bitmap_set_bits_in_run()
The Smatch reported a warning in __ntfs_bitmap_set_bits_in_run(): "warn: passing a valid pointer to 'PTR_ERR'" This occurs because the 'folio' variable might contain a valid pointer when jumping to the 'rollback' label, specifically when 'cnt <= 0' is detected during the subsequent page mapping loop. In such cases, calling PTR_ERR(folio) is incorrect as it does not contain an error code. Fix this by introducing an explicit 'err' variable to track the error status. This ensures that the rollback logic and the return value consistently use a proper error code regardless of the state of the folio pointer. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions