summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ir-kbd-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-10 09:18:41 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-10 09:18:41 -0300
commit5d8e954c2cbba759dc200b3acd3f5a75801e5a2c (patch)
tree58fb1e90027c8983dafe488137cdcc240c2203b1 /linux/drivers/media/video/ir-kbd-i2c.c
parent073577d733f738c84aa56ef40de678f019b9c53c (diff)
downloadmediapointer-dvb-s2-5d8e954c2cbba759dc200b3acd3f5a75801e5a2c.tar.gz
mediapointer-dvb-s2-5d8e954c2cbba759dc200b3acd3f5a75801e5a2c.tar.bz2
ir-kbd-i2c: Minor optimization in ir_probe
From: Jean Delvare <khali@linux-fr.org> 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>
Diffstat (limited to 'linux/drivers/media/video/ir-kbd-i2c.c')
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index 7bde716ad..198e0a18b 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -530,7 +530,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;
@@ -554,9 +554,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)