aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-04-22 14:45:47 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:07:49 -0300
commitd6f34d7adddb144c3b450e15df3749f0e0a651c6 (patch)
treec1fc5f810a31edf189520fe1d0cac38ef05b354c
parent2c4a07b2da61bcd33f18195ff7f355c5bb285904 (diff)
V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
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>
-rw-r--r--drivers/media/video/ir-kbd-i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 58a1ddddb09..7942bd07851 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -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;
@@ -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)