From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbdJKKRY (ORCPT ); Wed, 11 Oct 2017 06:17:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:50750 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbdJKKRX (ORCPT ); Wed, 11 Oct 2017 06:17:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,360,1503385200"; d="scan'208";a="1204603907" Date: Wed, 11 Oct 2017 13:17:19 +0300 From: Heikki Krogerus To: Colin King Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: wcove: fix uninitialized usbc_irq1 and usbc_irq2 Message-ID: <20171011101719.GC24789@kuha.fi.intel.com> References: <20171011090957.16499-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171011090957.16499-1-colin.king@canonical.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 11, 2017 at 10:09:57AM +0100, Colin King wrote: > From: Colin Ian King > > 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 Acked-by: Heikki Krogerus Thanks, -- heikki