return -ENOMEM if create_singlethread_workqueue failed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
pcap->irq_base = pdata->irq_base;
pcap->workqueue = create_singlethread_workqueue("pcapd");
if (!pcap->workqueue) {
pcap->irq_base = pdata->irq_base;
pcap->workqueue = create_singlethread_workqueue("pcapd");
if (!pcap->workqueue) {
dev_err(&spi->dev, "cant create pcap thread\n");
goto free_pcap;
}
dev_err(&spi->dev, "cant create pcap thread\n");
goto free_pcap;
}