From: Takashi Iwai Subject: Re: [PATCH 2/3] ALSA: HDA: Dont check return for snd_hdac_chip_readl Date: Tue, 04 Aug 2015 07:12:41 +0200 Message-ID: References: <1438660720-30033-1-git-send-email-vinod.koul@intel.com> <1438660720-30033-3-git-send-email-vinod.koul@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 533F1265701 for ; Tue, 4 Aug 2015 07:12:41 +0200 (CEST) In-Reply-To: <1438660720-30033-3-git-send-email-vinod.koul@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org, Jeeja KP List-Id: alsa-devel@alsa-project.org On Tue, 04 Aug 2015 05:58:39 +0200, Vinod Koul wrote: > > From: Jeeja KP > > 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 > Reported-by: Dan Carpenter > Signed-off-by: Vinod Koul Applied, thanks. Takashi > --- > sound/hda/ext/hdac_ext_controller.c | 6 ------ > 1 file changed, 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) > > 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)); > > -- > 1.9.1 >