Skip to content

Commit

Permalink
ALSA: HDA: Dont check return for snd_hdac_chip_readl
Browse files Browse the repository at this point in the history
The snd_hdac_chip_readl return can never be less than zeros,
so no point in checking for the return value

This fixes following static checker warnings in
snd_hdac_ext_bus_parse_capabilities

       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.

Signed-off-by: Jeeja KP <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
kpjeeja authored and tiwai committed Aug 4, 2015
1 parent 9b06dc9 commit 5d942ce
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sound/hda/ext/hdac_ext_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,10 @@ int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus)

offset = snd_hdac_chip_readl(bus, LLCH);

if (offset < 0)
return -EIO;

/* Lets walk the linked capabilities list */
do {
cur_cap = _snd_hdac_chip_read(l, bus, offset);

if (cur_cap < 0)
return -EIO;

dev_dbg(bus->dev, "Capability version: 0x%x\n",
((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF));

Expand Down

0 comments on commit 5d942ce

Please sign in to comment.