From: Dan Carpenter Date: Fri, 23 Mar 2012 22:02:07 +0000 (-0700) Subject: drivers/leds/leds-tca6507.c: cleanup error handling in tca6507_probe() X-Git-Tag: v3.4-rc1~109^2~100 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=920c4f4c3651855f888ec708ecc656ba10dd8f1d;p=pandora-kernel.git drivers/leds/leds-tca6507.c: cleanup error handling in tca6507_probe() Just a small tidy-up. 1) There is a NULL dereference if the tca allocation fails. 2) The call to cancel_work_sync() isn't needed because we haven't scheduled any work. 3) The call to i2c_set_clientdata() isn't needed because the core handles that automatically if probe() fails. 4) I added some curly braces for style reasons. Signed-off-by: Dan Carpenter Cc: Richard Purdie Acked-by: NeilBrown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed