Skip to contentSkip to conversation

ALSA: hdac_ext: add hdac extended controller

DISCUSSION Dan Carpenter 1 participant 1 message Jun 26, 2015

lore
Share & tools
lore
#0 lore raw

Hello Jeeja KP,

The patch 0b00a5615dc4: "ALSA: hdac_ext: add hdac extended controller" from Jun 11, 2015, leads to the following static checker warning:

sound/hda/ext/hdac_ext_controller.c:47 snd_hdac_ext_bus_parse_capabilities()
warn: unsigned 'offset' is never less than zero.

sound/hda/ext/hdac_ext_controller.c:54 snd_hdac_ext_bus_parse_capabilities()
warn: unsigned 'cur_cap' is never less than zero.

sound/hda/ext/hdac_ext_controller.c

    38  int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus)
    39  {
    40          unsigned int cur_cap;
    41          unsigned int offset;
    42          struct hdac_bus *bus = &ebus->bus;
    43          unsigned int counter = 0;
    44  
    45          offset = snd_hdac_chip_readl(bus, LLCH);
    46  
    47          if (offset < 0)
                    ^^^^^^^^^^
    48                  return -EIO;
    49  
    50          /* Lets walk the linked capabilities list */
    51          do {
    52                  cur_cap = _snd_hdac_chip_read(l, bus, offset);
    53  
    54                  if (cur_cap < 0)
                            ^^^^^^^^^^^
    55                          return -EIO;

regards,
dan carpenter