Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753078AbbLXJIE (ORCPT ); Thu, 24 Dec 2015 04:08:04 -0500 Received: from mail-ob0-f182.google.com ([209.85.214.182]:32909 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbbLXJH4 convert rfc822-to-8bit (ORCPT ); Thu, 24 Dec 2015 04:07:56 -0500 MIME-Version: 1.0 In-Reply-To: <1450907177-31529-1-git-send-email-ross.zwisler@linux.intel.com> References: <1450907177-31529-1-git-send-email-ross.zwisler@linux.intel.com> Date: Thu, 24 Dec 2015 10:07:55 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: Fix uninitialized variable warning From: Linus Walleij To: Ross Zwisler Cc: "linux-kernel@vger.kernel.org" , Bamvor Jian Zhang , Alexandre Courbot , "linux-gpio@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1126 Lines: 32 On Wed, Dec 23, 2015 at 10:46 PM, Ross Zwisler wrote: > Commit ef7c7553039b ("gpiolib: improve overlap check of range of gpio") > introduced the following compiler warning: > > drivers/gpio/gpiolib.c: In function ‘gpiochip_add’: > drivers/gpio/gpiolib.c:193:20: warning: ‘iterator’ may be used uninitialized in this function [-Wmaybe-uninitialized] > struct gpio_chip *iterator; > ^ > > Fix this by initializing 'iterator' to NULL. > > Signed-off-by: Ross Zwisler > --- > > This was found in next-20151223. Several people reported this and I was waiting for a proper fix from Bamvor (as it is a false compile warning and doesn't really indicate a real error) but now I'll apply this to get rid of all the reports and patches filling my mailbox... Merry Christmas! Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/