From patchwork Thu Sep 2 08:27:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 148681 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 o828Nfsr006196 for ; Thu, 2 Sep 2010 08:23:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148Ab0IBIXM (ORCPT ); Thu, 2 Sep 2010 04:23:12 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:55367 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751091Ab0IBIXL (ORCPT ); Thu, 2 Sep 2010 04:23:11 -0400 Received: by gxk23 with SMTP id 23so81239gxk.19 for ; Thu, 02 Sep 2010 01:23:10 -0700 (PDT) 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=kpZ53TaVVBm3DGyz6Vq/JMvE3Obh4g4e52Pe5SxpI3s=; b=lf5pFVTy818/V8VsKo2VMqFxWnenmCSUicaU4u0vuH6a99fyAUyIv8fOZ5SY6Rh24V WbKhorqGxKDN2fY8etdi2KUFKLRPUnfDHtAiEGnw7liQJ55gDR9wZdBNKUTcXknwMxmI 2YNnEsMnpwtK2slDuCe3vNlAuX1fVtaIulbQo= 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=rD3F8pK+ErUxrzf1U4OidAj3HCRiWapWpRl8Z1KsmagNZw41l8AKn1AhDaoGdib6j4 xugLH/G+Zg1YCxonjZA5qBJ2KcwjkiyrcwRkgerRqAMwMuV+8DmbwUbpg7APyqxv5r+m Hw+0y9Tgg3qDfLTQZ85mXIGBgiwyisWIRQRD4= Received: by 10.100.86.4 with SMTP id j4mr9658090anb.230.1283415789963; Thu, 02 Sep 2010 01:23:09 -0700 (PDT) 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 q7sm293478anf.26.2010.09.02.01.23.07 (version=SSLv3 cipher=RC4-MD5); Thu, 02 Sep 2010 01:23:09 -0700 (PDT) Subject: [PATCH] Input: wm97xx-core - use platform_device_del instead of platform_device_unregister for error handling From: Axel Lin To: linux-kernel Cc: Mark Brown , Liam Girdwood , Dmitry Torokhov , linux-input@vger.kernel.org Date: Thu, 02 Sep 2010 16:27:09 +0800 Message-Id: <1283416029.19272.3.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, 02 Sep 2010 08:38:55 +0000 (UTC) diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index cbfef1e..770537c 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -684,8 +684,7 @@ static int wm97xx_probe(struct device *dev) touch_reg_err: platform_device_put(wm->touch_dev); touch_err: - platform_device_unregister(wm->battery_dev); - wm->battery_dev = NULL; + platform_device_del(wm->battery_dev); batt_reg_err: platform_device_put(wm->battery_dev); batt_err: