Merge "input: touchscreen: synaptics_dsx: Handle failure case during probe"
This commit is contained in:
commit
a9a39fb11e
1 changed files with 11 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
|
* Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
|
||||||
* Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
|
* Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
|
||||||
* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -3808,6 +3808,13 @@ static int synaptics_rmi4_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
exp_data.workqueue = create_singlethread_workqueue("dsx_exp_workqueue");
|
exp_data.workqueue = create_singlethread_workqueue("dsx_exp_workqueue");
|
||||||
|
if (exp_data.workqueue == NULL) {
|
||||||
|
dev_err(&pdev->dev,
|
||||||
|
"%s: Failed to create workqueue\n", __func__);
|
||||||
|
retval = -ENOMEM;
|
||||||
|
goto err_create_wq;
|
||||||
|
}
|
||||||
|
|
||||||
INIT_DELAYED_WORK(&exp_data.work, synaptics_rmi4_exp_fn_work);
|
INIT_DELAYED_WORK(&exp_data.work, synaptics_rmi4_exp_fn_work);
|
||||||
exp_data.rmi4_data = rmi4_data;
|
exp_data.rmi4_data = rmi4_data;
|
||||||
exp_data.queue_work = true;
|
exp_data.queue_work = true;
|
||||||
|
@ -3859,10 +3866,9 @@ err_create_debugfs_file:
|
||||||
debugfs_remove_recursive(rmi4_data->dir);
|
debugfs_remove_recursive(rmi4_data->dir);
|
||||||
err_create_debugfs_dir:
|
err_create_debugfs_dir:
|
||||||
cancel_delayed_work_sync(&exp_data.work);
|
cancel_delayed_work_sync(&exp_data.work);
|
||||||
if (exp_data.workqueue != NULL) {
|
flush_workqueue(exp_data.workqueue);
|
||||||
flush_workqueue(exp_data.workqueue);
|
destroy_workqueue(exp_data.workqueue);
|
||||||
destroy_workqueue(exp_data.workqueue);
|
err_create_wq:
|
||||||
}
|
|
||||||
synaptics_rmi4_irq_enable(rmi4_data, false);
|
synaptics_rmi4_irq_enable(rmi4_data, false);
|
||||||
free_irq(rmi4_data->irq, rmi4_data);
|
free_irq(rmi4_data->irq, rmi4_data);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue