]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/input/touchscreen/cyttsp4_core.c
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[mirror_ubuntu-artful-kernel.git] / drivers / input / touchscreen / cyttsp4_core.c
index 851e3ff80437fd43ba3120827ca3c5f4826167ad..edcf7993034bc390ffe6d34c6b129ae4afd79292 100644 (file)
@@ -2025,7 +2025,7 @@ struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops,
        if (!cd->xfer_buf) {
                dev_err(dev, "%s: Error, kzalloc\n", __func__);
                rc = -ENOMEM;
-               goto error_alloc_data;
+               goto error_free_cd;
        }
 
        /* Initialize device info */
@@ -2049,7 +2049,7 @@ struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops,
        cd->irq = gpio_to_irq(cd->cpdata->irq_gpio);
        if (cd->irq < 0) {
                rc = -EINVAL;
-               goto error_gpio_irq;
+               goto error_free_xfer;
        }
 
        dev_set_drvdata(dev, cd);
@@ -2117,7 +2117,9 @@ error_request_irq:
        if (cd->cpdata->init)
                cd->cpdata->init(cd->cpdata, 0, dev);
        dev_set_drvdata(dev, NULL);
-error_gpio_irq:
+error_free_xfer:
+       kfree(cd->xfer_buf);
+error_free_cd:
        kfree(cd);
 error_alloc_data:
 error_no_pdata: