mm/slab_common: reduce an if statement in create_cache()
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 6 Jun 2023 06:55:43 +0000 (14:55 +0800)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 6 Jun 2023 08:37:19 +0000 (10:37 +0200)
commitb9dad156af1fd6c66ffa40f007c09823a8319abe
tree84502ce8462fb620c89902a4eb0711baf17f62c5
parentd2e527f0d8d1124b1fab93e2e7b2c6a114c0e5a2
mm/slab_common: reduce an if statement in create_cache()

Move the 'out:' statement block out of the successful path to avoid
redundant check on 'err'. The value of 'err' is always zero on success
and negative on failure.

No functional changes, no performance improvements, just a little more
readability.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab_common.c