/me wonders if cppcheck is right here :

static int get_key_flydvb_trio(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{
        int gpio;
        int attempt = 0;
        unsigned char b;

        /* We need this to access GPI Used by the saa_readl macro. */
        struct saa7134_dev *dev = ir->c->adapter->algo_data;

        if (dev == NULL) {
                i2cdprintk("get_key_flydvb_trio: "
                           "ir->c->adapter->algo_data is NULL!\n");
                return -EIO;
        }

        /* rising SAA7134_GPIGPRESCAN reads the status */
        saa_clearb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
        saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);

        gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);

        if (0x40000 & ~gpio)
                return 0; /* No button press */

        /* No button press - only before first key pressed */
        if (b == 0xFF)                                                          
 <--- Uninitialized variable: b
                return 0;

        /* poll IR chip */
        /* weak up the IR chip */
        b = 0;

 
-- 
Toralf

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to