Skip to content

Commit

Permalink
V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
Browse files Browse the repository at this point in the history
This saves an initialization and a comparison.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 2c4a07b commit d6f34d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/ir-kbd-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static int ir_probe(struct i2c_adapter *adap)
static const int probe_em28XX[] = { 0x30, 0x47, -1 };
static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
static const int probe_cx23885[] = { 0x6b, -1 };
const int *probe = NULL;
const int *probe;
struct i2c_client *c;
unsigned char buf;
int i, rc;
Expand All @@ -532,9 +532,9 @@ static int ir_probe(struct i2c_adapter *adap)
case I2C_HW_B_CX23885:
probe = probe_cx23885;
break;
}
if (NULL == probe)
default:
return 0;
}

c = kzalloc(sizeof(*c), GFP_KERNEL);
if (!c)
Expand Down

0 comments on commit d6f34d7

Please sign in to comment.