mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
pm2301_charger: Return error if create_singlethread_workqueue fails
Return error instead of 0 if create_singlethread_workqueue call fails. Signed-off-by: Axel Lin <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
df311333a8
commit
c509a62c94
1 changed files with 2 additions and 2 deletions
|
|
@ -1075,9 +1075,9 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client,
|
|||
pm2->ac_chg.external = true;
|
||||
|
||||
/* Create a work queue for the charger */
|
||||
pm2->charger_wq =
|
||||
create_singlethread_workqueue("pm2xxx_charger_wq");
|
||||
pm2->charger_wq = create_singlethread_workqueue("pm2xxx_charger_wq");
|
||||
if (pm2->charger_wq == NULL) {
|
||||
ret = -ENOMEM;
|
||||
dev_err(pm2->dev, "failed to create work queue\n");
|
||||
goto free_device_info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue