mirror of https://github.com/torvalds/linux.git
maple tree: use goto label to simplify code
Use the underflow goto label to set the status to ma_underflow and return NULL, as is being done elsewhere. [akpm@linux-foundation.org: add newline, per Liam (and remove one, per akpm)] Link: https://lkml.kernel.org/r/20250624080748.4855-1-dev.jain@arm.com Signed-off-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
dfa3cf0bc0
commit
592b939b59
|
|
@ -4560,15 +4560,12 @@ static void *mas_prev_slot(struct ma_state *mas, unsigned long min, bool empty)
|
|||
if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
|
||||
goto retry;
|
||||
|
||||
|
||||
if (likely(entry))
|
||||
return entry;
|
||||
|
||||
if (!empty) {
|
||||
if (mas->index <= min) {
|
||||
mas->status = ma_underflow;
|
||||
return NULL;
|
||||
}
|
||||
if (mas->index <= min)
|
||||
goto underflow;
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue