diff mbox

[2/2] Input: xpad - sanitize xpad_led_disconnect()

Message ID 1291215874-5625-2-git-send-email-namhyung@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Namhyung Kim Dec. 1, 2010, 3:04 p.m. UTC
None
diff mbox

Patch

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