From patchwork Wed Dec 1 15:04:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 371481 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 oB1F5WVS019028 for ; Wed, 1 Dec 2010 15:05:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803Ab0LAPEz (ORCPT ); Wed, 1 Dec 2010 10:04:55 -0500 Received: from mail-px0-f174.google.com ([209.85.212.174]:51097 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754102Ab0LAPEy (ORCPT ); Wed, 1 Dec 2010 10:04:54 -0500 Received: by pxi15 with SMTP id 15so1080941pxi.19 for ; Wed, 01 Dec 2010 07:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=vETZ5xlf0TLX90b4tIJCD5DvhZaIuF7vL/iAzMUrhwI=; b=CtWT0eO7su8NN/t0VH98TmcigOe0ynal0LyHsaSKtejBFBPOtE7w1QiGs38sObwL0m jPem8SpgMpYyjDnuKjda5AoTnaXDpWBI2QIols62l9CqMKX9Bngjuag0ZbgQQ4Ljs84/ wdZ4dIUO8Ixy4Q7BJrvJ0Vuc1nD2zjEzERaQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=QeYW62/SzzD4OePU/+iHqrn/hqzi3Rul+A0WHvLklsIjqtRzIiL0ct+Mkek8OdUS48 4c7sfDs0ypFju57ozo3l+IU9np9Ai8eVvLFaytwJHtJ+O8cjImTbc48MOXR+6ItUB0Z3 MEEK9coLQwFNIhudVomNwRrd4gGcFeV4plz/8= Received: by 10.142.241.10 with SMTP id o10mr8923511wfh.393.1291215893711; Wed, 01 Dec 2010 07:04:53 -0800 (PST) Received: from localhost.localdomain ([211.201.183.198]) by mx.google.com with ESMTPS id w42sm82083wfh.15.2010.12.01.07.04.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Dec 2010 07:04:52 -0800 (PST) From: Namhyung Kim To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kratochvil Subject: [PATCH 2/2] Input: xpad - sanitize xpad_led_disconnect() Date: Thu, 2 Dec 2010 00:04:34 +0900 Message-Id: <1291215874-5625-2-git-send-email-namhyung@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1291215874-5625-1-git-send-email-namhyung@gmail.com> References: <1291215874-5625-1-git-send-email-namhyung@gmail.com> 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]); Wed, 01 Dec 2010 15:05:32 +0000 (UTC) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index f885902..1ca49e8 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -728,7 +728,8 @@ static void xpad_led_disconnect(struct usb_xpad *xpad) if (xpad_led) { led_classdev_unregister(&xpad_led->led_cdev); - kfree(xpad_led->name); + kfree(xpad_led); + xpad->led = NULL; } } #else