Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: qinyu <qinyu32@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
- Loading branch information