Skip to content

Commit

Permalink
cfag12864b fix
Browse files Browse the repository at this point in the history
This one-liner patch fixes a bug in drivers/auxdisplay/cfag12864b.c

At cfag12864b_init(), the driver tries to kalloc some memory in the
variable cfag12864b_cache.

Then, as usual, it checks if the call failed. However, it checks
cfag12864b_buffer instead.

This patch changes the "cfag12864b_buffer" to "cfag12864b_cache" so the
correct variable is checked.

Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ojeda authored and Linus Torvalds committed Aug 23, 2007
1 parent aa79850 commit fe58103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/auxdisplay/cfag12864b.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int __init cfag12864b_init(void)

cfag12864b_cache = kmalloc(sizeof(unsigned char) *
CFAG12864B_SIZE, GFP_KERNEL);
if (cfag12864b_buffer == NULL) {
if (cfag12864b_cache == NULL) {
printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
"can't alloc cache buffer (%i bytes)\n",
CFAG12864B_SIZE);
Expand Down

0 comments on commit fe58103

Please sign in to comment.