]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
leds: leds-pca9532 - fix memory leak and properly handle errors
authorSven Wegener <sven.wegener@stealer.net>
Wed, 3 Dec 2008 08:12:53 +0000 (08:12 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 8 Jan 2009 12:38:58 +0000 (12:38 +0000)
commitf785d022add53ec4d9625495b335bed40bd6c079
tree99225d733708b6dbcc54ffa0a33f528eb756ee1e
parent12276efcc85f3108174893bff8878e0dc655b066
leds: leds-pca9532 - fix memory leak and properly handle errors

When the registration fails, we need to release the memory we allocated.
Also we need to save the error from led_classdev_register and propagate
it up, else we'll return success, even if we failed.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/leds/leds-pca9532.c