Skip to content

Commit

Permalink
matrox maven: fix a broken error path
Browse files Browse the repository at this point in the history
I broke an error path with d03c21e,
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>
Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jean Delvare authored and torvalds committed Aug 12, 2008
1 parent d6bf73e commit 5ede40f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/matrox/matroxfb_maven.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5ede40f

Please sign in to comment.