From patchwork Thu Nov 11 03:21:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 316292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAB3I1xr004463 for ; Thu, 11 Nov 2010 03:18:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167Ab0KKDSA (ORCPT ); Wed, 10 Nov 2010 22:18:00 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:64837 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932104Ab0KKDR7 (ORCPT ); Wed, 10 Nov 2010 22:17:59 -0500 Received: by vws13 with SMTP id 13so152616vws.19 for ; Wed, 10 Nov 2010 19:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=B9JINk3qvVe6t3EvyPqx74PuLQ/NTQoqOS1MM2qWC3o=; b=s0KCrDi+CRROW7qJEMwbubQeDTym+xCamw9RicTjWRHKeTiOcyr1su8I87V9LpgWHe 9BOa5lGlHJKgQhTMGCtIi/Ceioc9mOj2jTOjeIef0LgIMuAKKhERJ9kASVJ6ZOBnTpfO gJNUx7jJjxe+bYPPe9AAhv67WtT8lYV5RBpsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=VoUKDdvkcIxzyAq/ssiPiOLBGh9hymyKT2fTa9tSltYieW82QVeknu7apamHL/VzTB 1nIY3D7TFmFb2uXmBh0PyRIAK2SBbGhn/ZGmwXvINGPSDt7qEIAwWbhnKqoiaId1D53R rzaOeEzwo7o9J8oJz/WDN34Cj568QAdPt9d48= Received: by 10.220.181.199 with SMTP id bz7mr54685vcb.244.1289445478874; Wed, 10 Nov 2010 19:17:58 -0800 (PST) Received: from [192.168.100.50] (60-251-136-127.HINET-IP.hinet.net [60.251.136.127]) by mx.google.com with ESMTPS id e16sm481091vcm.32.2010.11.10.19.17.55 (version=SSLv3 cipher=RC4-MD5); Wed, 10 Nov 2010 19:17:57 -0800 (PST) Subject: [PATCH] Input: acecad - fix a memory leak in usb_acecad_probe error path From: Axel Lin To: linux-kernel Cc: Dmitry Torokhov , Stephane VOLTZ , Edouard TISSERANT , linux-input@vger.kernel.org Date: Thu, 11 Nov 2010 11:21:55 +0800 Message-Id: <1289445715.3183.1.camel@mola> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 11 Nov 2010 03:18:02 +0000 (UTC) diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index aea9a93..d94f7e9 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -229,12 +229,13 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ err = input_register_device(acecad->input); if (err) - goto fail2; + goto fail3; usb_set_intfdata(intf, acecad); return 0; + fail3: usb_free_urb(acecad->irq); fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma); fail1: input_free_device(input_dev); kfree(acecad);