Skip to content
Commit bfaecf46 authored by qinyu's avatar qinyu Committed by Sebastian Reichel
Browse files

power: supply: fix null pointer check order in __power_supply_register



There is an null pointer check order issue here: if we have to
check !desc and !desc->name anyway, check it before dereferencing it in
pr_warn().

Signed-off-by: default avatarqinyu <qinyu32@huawei.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent c142872e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment