Commit f07728d
btrfs: clean up NULL checks in qgroup_unreserve_range()
Smatch complains that this code dereferences "entry" before checking
whether it's NULL on the next line. Fortunately, rb_entry() will never
return NULL so it doesn't cause a problem. We can clean up the NULL
checking a bit to silence the warning and make the code more clear.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent fca3a45 commit f07728d
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3435 | 3435 | | |
3436 | 3436 | | |
3437 | 3437 | | |
3438 | | - | |
| 3438 | + | |
3439 | 3439 | | |
3440 | 3440 | | |
3441 | 3441 | | |
| 3442 | + | |
| 3443 | + | |
3442 | 3444 | | |
3443 | 3445 | | |
3444 | 3446 | | |
3445 | 3447 | | |
3446 | | - | |
3447 | | - | |
3448 | 3448 | | |
3449 | | - | |
| 3449 | + | |
3450 | 3450 | | |
3451 | 3451 | | |
3452 | | - | |
3453 | | - | |
3454 | | - | |
3455 | | - | |
3456 | 3452 | | |
3457 | 3453 | | |
3458 | 3454 | | |
| |||
0 commit comments