Message ID | 51D42350.10504@cypress.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jul 03, 2013 at 04:12:48PM +0300, Ferruh Yigit wrote: > On 07/03/2013 12:44 AM, Dan Carpenter wrote: > >We leak "cd" if the cd->xfer_buf allocation fails. It was weird to > >"goto error_gpio_irq" so I changed the label name. (Label names should > >reflect the label location not the goto location otherwise you get an > >"all roads lead to Rome problem"). > > > >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > xfer_buf still may not be freed, I propose following one instead: > That's a good point. I missed that leak. The problem is that my patch was already applied so this patch would have to be re-written on top of that. Also this patch is whitespace dammaged and won't apply. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/03/2013 04:50 PM, Dan Carpenter wrote: > On Wed, Jul 03, 2013 at 04:12:48PM +0300, Ferruh Yigit wrote: >> On 07/03/2013 12:44 AM, Dan Carpenter wrote: >>> We leak "cd" if the cd->xfer_buf allocation fails. It was weird to >>> "goto error_gpio_irq" so I changed the label name. (Label names should >>> reflect the label location not the goto location otherwise you get an >>> "all roads lead to Rome problem"). >>> >>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> >>> >> xfer_buf still may not be freed, I propose following one instead: >> > That's a good point. I missed that leak. The problem is that my > patch was already applied so this patch would have to be re-written > on top of that. Also this patch is whitespace dammaged and won't > apply. OK, I am preparing the patch over previous one. Thanks, ferruh This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index 69c9cff..219e32d 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -2034,7 +2034,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_alloc_xfer; }