summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-08-12 23:20:04 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-20 11:15:25 -0700
commitb50504f77c63d836cd2ed62d3e675353970b4d58 (patch)
tree060926a1337088f40fadfa3af5d33be53163bd43
parenta81a91f03af0cb89a8a5144d2bb2dc670000aef8 (diff)
downloadlwn-b50504f77c63d836cd2ed62d3e675353970b4d58.tar.gz
lwn-b50504f77c63d836cd2ed62d3e675353970b4d58.zip
matrox maven: fix a broken error path
commit 5ede40f87957c6ededf9284c8339722a97b9dfb6 upstream 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 <khali@linux-fr.org> Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/video/matrox/matroxfb_maven.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index 0cd58f84fb46..8c416f772924 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;
}