aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Ojeda <maxextreme@gmail.com>2007-08-22 17:01:56 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-22 22:52:46 -0400
commitfe58103a56f05613cb1f0ef228354d4d5f6c2b08 (patch)
treeb5b3982dd03e04dce4bf084baf8c58110b69d111
parentaa7985056286f5f912af7bb03f883230cc527701 (diff)
cfag12864b fix
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 <maxextreme@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/auxdisplay/cfag12864b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c
index cb44cb4f6a47..80bb06105387 100644
--- a/drivers/auxdisplay/cfag12864b.c
+++ b/drivers/auxdisplay/cfag12864b.c
@@ -355,7 +355,7 @@ static int __init cfag12864b_init(void)
355 355
356 cfag12864b_cache = kmalloc(sizeof(unsigned char) * 356 cfag12864b_cache = kmalloc(sizeof(unsigned char) *
357 CFAG12864B_SIZE, GFP_KERNEL); 357 CFAG12864B_SIZE, GFP_KERNEL);
358 if (cfag12864b_buffer == NULL) { 358 if (cfag12864b_cache == NULL) {
359 printk(KERN_ERR CFAG12864B_NAME ": ERROR: " 359 printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
360 "can't alloc cache buffer (%i bytes)\n", 360 "can't alloc cache buffer (%i bytes)\n",
361 CFAG12864B_SIZE); 361 CFAG12864B_SIZE);