[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171011101719.GC24789@kuha.fi.intel.com>
Date: Wed, 11 Oct 2017 13:17:19 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Colin King <colin.king@...onical.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: typec: wcove: fix uninitialized usbc_irq1 and
usbc_irq2
On Wed, Oct 11, 2017 at 10:09:57AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Calls to regmap_read may fail with an -EINVAL return without setting
> usbc_irq1 and usbc_irq2. The error handling clean up expects these
> to have been set (or zero on a failure) and currently may try to
> clear the wrong IRQs if the uninitalized garbage values in usbc_irq1
> or usbc_irq2 are non-zero. The simplest fix is to ensure these
> variables are initialized to zero.
>
> Detected by CoverityScan, CID#1457737 ("Uninitialized scalar variable")
>
> Fixes: 3c4fb9f16921 ("usb: typec: wcove: start using tcpm for USB PD support")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Acked-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Thanks,
--
heikki
Powered by blists - more mailing lists