Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181436
b: refs/heads/master
c: 3205e4f
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Feb 26, 2010
1 parent f4a3dbe commit 394c6f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4622c14a1450fa40dd89dc134ec008fd1c2d38c
refs/heads/master: 3205e4fe0d831c0457e9139794437e9999559150
12 changes: 4 additions & 8 deletions trunk/drivers/media/IR/ir-keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,14 @@ static void ir_delete_key(struct ir_scancode_table *rc_tab, int elem)
int newsize = rc_tab->size - 1;
int resize = ir_is_resize_needed(rc_tab, newsize);
struct ir_scancode *oldkeymap = rc_tab->scan;
struct ir_scancode *newkeymap;
struct ir_scancode *newkeymap = NULL;

if (resize) {
if (resize)
newkeymap = kzalloc(ir_roundup_tablesize(newsize) *
sizeof(*newkeymap), GFP_ATOMIC);

/* There's no memory for resize. Keep the old table */
if (!newkeymap)
resize = 0;
}

if (!resize) {
/* There's no memory for resize. Keep the old table */
if (!resize || !newkeymap) {
newkeymap = oldkeymap;

/* We'll modify the live table. Lock it */
Expand Down

0 comments on commit 394c6f2

Please sign in to comment.