diff options
author | Jeeja KP <jeeja.kp@intel.com> | 2015-08-03 23:58:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-08-04 01:04:46 -0400 |
commit | 5d942ce63c8fd98794a8ba9af559925c8432a052 (patch) | |
tree | c5dd71eea77daf61d8103e8131a57c80227867d9 | |
parent | 9b06dc939489152b583131f49929ed1c6ae83740 (diff) |
ALSA: HDA: Dont check return for snd_hdac_chip_readl
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 <jeeja.kp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/hda/ext/hdac_ext_controller.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sound/hda/ext/hdac_ext_controller.c b/sound/hda/ext/hdac_ext_controller.c index b2da19b60f4e..358f16195483 100644 --- a/sound/hda/ext/hdac_ext_controller.c +++ b/sound/hda/ext/hdac_ext_controller.c | |||
@@ -44,16 +44,10 @@ int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus) | |||
44 | 44 | ||
45 | offset = snd_hdac_chip_readl(bus, LLCH); | 45 | offset = snd_hdac_chip_readl(bus, LLCH); |
46 | 46 | ||
47 | if (offset < 0) | ||
48 | return -EIO; | ||
49 | |||
50 | /* Lets walk the linked capabilities list */ | 47 | /* Lets walk the linked capabilities list */ |
51 | do { | 48 | do { |
52 | cur_cap = _snd_hdac_chip_read(l, bus, offset); | 49 | cur_cap = _snd_hdac_chip_read(l, bus, offset); |
53 | 50 | ||
54 | if (cur_cap < 0) | ||
55 | return -EIO; | ||
56 | |||
57 | dev_dbg(bus->dev, "Capability version: 0x%x\n", | 51 | dev_dbg(bus->dev, "Capability version: 0x%x\n", |
58 | ((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF)); | 52 | ((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF)); |
59 | 53 | ||