aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorGao Xiang <[email protected]>2019-08-30 01:17:41 +0800
committerGreg Kroah-Hartman <[email protected]>2019-08-30 09:02:10 +0200
commit097a802ae15e2c6d17256a6fe0712a655ba10823 (patch)
tree880a9dc3a415d9018099694e7f996fe676039add /net/switchdev/switchdev.c
parent8d8a09b093d7073465c824f74caf315c073d3875 (diff)
erofs: reduntant assignment in __erofs_get_meta_page()
As Joe Perches suggested [1], err = bio_add_page(bio, page, PAGE_SIZE, 0); - if (unlikely(err != PAGE_SIZE)) { + if (err != PAGE_SIZE) { err = -EFAULT; goto err_out; } The initial assignment to err is odd as it's not actually an error value -E<FOO> but a int size from a unsigned int len. Here the return is either 0 or PAGE_SIZE. This would be more legible to me as: if (bio_add_page(bio, page, PAGE_SIZE, 0) != PAGE_SIZE) { err = -EFAULT; goto err_out; } [1] https://lore.kernel.org/r/[email protected]/ Signed-off-by: Gao Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions