mfd: Fix ezx_pcap_probe error path
authorAxel Lin <axel.lin@gmail.com>
Tue, 19 Oct 2010 12:28:24 +0000 (20:28 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:30:31 +0000 (00:30 +0200)
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>
drivers/mfd/ezx-pcap.c

index d283d77..c2b698d 100644 (file)
@@ -465,6 +465,7 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi)
        pcap->irq_base = pdata->irq_base;
        pcap->workqueue = create_singlethread_workqueue("pcapd");
        if (!pcap->workqueue) {
+               ret = -ENOMEM;
                dev_err(&spi->dev, "cant create pcap thread\n");
                goto free_pcap;
        }