瀏覽代碼

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>
Jeeja KP 10 年之前
父節點
當前提交
5d942ce63c
共有 1 個文件被更改,包括 0 次插入6 次删除
  1. 0 6
      sound/hda/ext/hdac_ext_controller.c

+ 0 - 6
sound/hda/ext/hdac_ext_controller.c

@@ -44,16 +44,10 @@ int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus)
 
 
 	offset = snd_hdac_chip_readl(bus, LLCH);
 	offset = snd_hdac_chip_readl(bus, LLCH);
 
 
-	if (offset < 0)
-		return -EIO;
-
 	/* Lets walk the linked capabilities list */
 	/* Lets walk the linked capabilities list */
 	do {
 	do {
 		cur_cap = _snd_hdac_chip_read(l, bus, offset);
 		cur_cap = _snd_hdac_chip_read(l, bus, offset);
 
 
-		if (cur_cap < 0)
-			return -EIO;
-
 		dev_dbg(bus->dev, "Capability version: 0x%x\n",
 		dev_dbg(bus->dev, "Capability version: 0x%x\n",
 				((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF));
 				((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF));