From patchwork Wed Jul 20 07:38:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 990392 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6K7cKan000625 for ; Wed, 20 Jul 2011 07:38:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751153Ab1GTHiS (ORCPT ); Wed, 20 Jul 2011 03:38:18 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:48920 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104Ab1GTHiR (ORCPT ); Wed, 20 Jul 2011 03:38:17 -0400 Received: by gwaa18 with SMTP id a18so362985gwa.19 for ; Wed, 20 Jul 2011 00:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=OHBufAFSFDQIzWySvCmMA3aJV647SmdeUn43WRU5GDQ=; b=oAMUMGsn+B+H87NX3LUC/ByWv8RMqy6Dn/BbL3KxchQD0OdLCSAoZaoGm2hRnShhFW FW0fcqha+Sqoex9a6/y8w8Mle7LqqNxoDCyq50HIPzJkpEQB95Zh9cjx7zH7G1fuT2K6 dTggXVPiLKFd59kZC1kVn9XB3Ij0GJ0Tn+Ono= Received: by 10.236.141.167 with SMTP id g27mr9820194yhj.455.1311147497051; Wed, 20 Jul 2011 00:38:17 -0700 (PDT) Received: from [218.172.238.179] (218-172-238-179.dynamic.hinet.net [218.172.238.179]) by mx.google.com with ESMTPS id v25sm317479yhk.8.2011.07.20.00.38.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 00:38:16 -0700 (PDT) Subject: [PATCH] Input: mpu3050 - call input_free_device() in mpu3050_probe() error handling From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Dmitry Torokhov , Joseph Lai , linux-input@vger.kernel.org Date: Wed, 20 Jul 2011 15:38:10 +0800 Message-ID: <1311147490.10091.1.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 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.6 (demeter1.kernel.org [140.211.167.41]); Wed, 20 Jul 2011 07:51:12 +0000 (UTC) From 3dcc899388d98a68c22d14b3149d3cc472f8d2fa Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 20 Jul 2011 15:34:33 +0800 Subject: [PATCH] Input: mpu3050 - correct call to input_free_device input_free_device() should be used if input_register_device() was not called yet or if it failed. Signed-off-by: Axel Lin --- drivers/input/misc/mpu3050.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c index b95fac1..f71dc72 100644 --- a/drivers/input/misc/mpu3050.c +++ b/drivers/input/misc/mpu3050.c @@ -282,7 +282,7 @@ err_free_irq: err_pm_set_suspended: pm_runtime_set_suspended(&client->dev); err_free_mem: - input_unregister_device(idev); + input_free_device(idev); kfree(sensor); return error; }