Skip to contentSkip to conversation

Input: mpu3050 - call input_free_device() in mpu3050_probe() error handling

PATCH In review Axel Lin 1 participant 2 messages Jul 20, 2011 – Aug 11, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 Input: mpu3050 - call input_free_device() in mpu3050_probe() error handling

Quoted 1 line

From 3dcc899388d98a68c22d14b3149d3cc472f8d2fa Mon Sep 17 00:00:00 2001

From: Axel Lin <[email protected]>
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.

---
 drivers/input/misc/mpu3050.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/misc/mpu3050.c +1 -1
index b95fac1..f71dc72 100644
@@ -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;
 }
Signature · 1 line
1.7.4.1
author
#1 lore raw

2011/7/20 Axel Lin <[email protected]>:

Quoted 10 lines

From 3dcc899388d98a68c22d14b3149d3cc472f8d2fa Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
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.

---

hi Dmitry,
Seems this fix is not yet upstream.

Regards,
Axel