From: Jean Delvare Date: Tue, 12 Aug 2008 22:08:53 +0000 (-0700) Subject: matrox maven: fix a broken error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ede40f87957c6ededf9284c8339722a97b9dfb6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git matrox maven: fix a broken error path I broke an error path with d03c21ec0be7787ff6b75dcf56c0e96209ccbfbd, sorry about that. The machine will crash if the i2c_attach_client() or maven_init_client() calls fail, although nobody has yet reported this happening. Signed-off-by: Jean Delvare Acked-by: Krzysztof Helt Cc: Petr Vandrovec Cc: [2.6.25.x, 2.6.26.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 89da27bd5c49..2ad06b0125c3 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c @@ -1266,7 +1266,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin ERROR4:; i2c_detach_client(new_client); ERROR3:; - kfree(new_client); + kfree(data); ERROR0:; return err; }