]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
authorJean Delvare <khali@linux-fr.org>
Tue, 22 Apr 2008 17:45:47 +0000 (14:45 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:49 +0000 (14:07 -0300)
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>
drivers/media/video/ir-kbd-i2c.c

index 58a1ddddb09ec16a421de946800ab1d48d8199ce..7942bd078513ac61b522c9a994e466ff3964acfa 100644 (file)
@@ -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)