[ARM] tegra: stingray: Invalid kfree in lm3559 error path
authorvcdt34 <john.poplett@motorola.com>
Wed, 29 Sep 2010 21:37:53 +0000 (16:37 -0500)
committerColin Cross <ccross@android.com>
Thu, 7 Oct 2010 00:03:18 +0000 (17:03 -0700)
A failed write in the lm3559 driver takes an error path
that incorrectly attempted to free statically allocated
memory, resulting in a kernel crash. This bug prevents
the kernel from booting successfully on development
hardware systems that doesn't have the torch LED.

Change-Id: I96d252c5d5b6939f5d47e27aece81e1f61ba1cd1
Signed-off-by: John Poplett <john.poplett@motorola.com>
drivers/leds/led-lm3559.c

index 7434eac89a0a976228278f8f6f55d198d21eca81..2b8bb805efe8e1f4890fe9e860f8b94bdf7083cc 100644 (file)
@@ -404,7 +404,6 @@ static int lm3559_remove(struct i2c_client *client)
                        led_classdev_unregister(&torch_data->flash_dev);
                }
 
-               kfree(torch_data->pdata);
                kfree(torch_data);
        }
        return 0;