Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3869853pxb; Tue, 17 Nov 2020 05:50:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyp9tmssPzq1DMajm1L9Sc83RKOfvqSbtDn2mnlWZM39lpjamaBWlXTtLSlYtTxLceGGRI0 X-Received: by 2002:a05:6402:cb4:: with SMTP id cn20mr21898534edb.186.1605621056820; Tue, 17 Nov 2020 05:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621056; cv=none; d=google.com; s=arc-20160816; b=H/n0rNv4CmHg8L+dxy7tN60IOQa1PdGgH9K6ErOLlh12ZdhjdSDJnKWrsUYo8OZAFI MR8/1Dyg0U5dWGnBhKJuY9gb+08mBDEcV1hHqPhx1s7zPtdHZ1dDVT8FVNiplHB4PI4C aN+KMWjMnA6FKDV0VzNO+OHUqsg2QJhTctfKhfQ56TWX7+Dj0m5jEmze+7AYdgzk36Ke Lhw3bzwZJt2DdMckbmWPdVICUy2pf26vnxMPsNao0Mv8poWrZzlQYava2vt4hSN71wOx 4ENxl61saIOgJAYbTm2t0M+CCoeQhgK+m/LSe0+kxkre580EARdM2Hx+1sXxwIGmGABh 5ymA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kOcAzmM1SZKHFFXIEWnnK7ZD9qx+++0mNylvoHpK1qc=; b=wWiu1BQYIM1Mxd/gajBuom9o5SGliK7ADEzqLtPQgZC+inS3DkbUDJxhILQSYLsYUJ oaJJDn9RjLtxWMHUlZ/qL39sZBZzQy7wRSGC4yyySYWNIVuhlGnmq7uo3+14qZUkeU0P kXzWCSPQ2Tu2r5hWKm4BNxUiBZCDAuk5cDOg5D4ogHFWfM/wXY0yvhNaEZslWAErQFe7 LWjOf0rlJgL5UcS+WKExQNT9UGHMBYN3eXx1VonfgSwSme10XNm93XG2CDWRF4bKKKkr qSxorZSCZgUWmp/g/K/Ft5THtKIUj9JqIBn8PgZOH1xlHoRR2vMe+fqkc0eRNWg+j7eE axZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=edAJQ9CI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo5si14067177ejb.102.2020.11.17.05.50.32; Tue, 17 Nov 2020 05:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=edAJQ9CI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732963AbgKQNrA (ORCPT + 99 others); Tue, 17 Nov 2020 08:47:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:48524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732958AbgKQNhb (ORCPT ); Tue, 17 Nov 2020 08:37:31 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4E3C2466D; Tue, 17 Nov 2020 13:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620249; bh=s+8Zbm6GDao8cUOKUQEChQnn8W1y35LvzL/lOxA9zWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=edAJQ9CI2W1EDSWGhRKhdHtzFyW/KrOQFug9Oq3M71njqyxg1zcCdahFXr+FZzgXy 7PrqHfx1GSaeAP3miGZ37UEg/rehx3b7ydoHDPcCDVNtH7aOYyq6d6lYGXsGkZAqWU bdh8UAJihv3/rYymN+RTc8I0Ns6czyKtlw3Vknp0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= , Mark Brown , Nathan Chancellor Subject: [PATCH 5.9 126/255] spi: bcm2835: remove use of uninitialized gpio flags variable Date: Tue, 17 Nov 2020 14:04:26 +0100 Message-Id: <20201117122145.065791791@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Hundebøll commit bc7f2cd7559c5595dc38b909ae9a8d43e0215994 upstream. Removing the duplicate gpio chip select level handling in bcm2835_spi_setup() left the lflags variable uninitialized. Avoid trhe use of such variable by passing default flags to gpiochip_request_own_desc(). Fixes: 5e31ba0c0543 ("spi: bcm2835: fix gpio cs level inversion") Signed-off-by: Martin Hundebøll Link: https://lore.kernel.org/r/20201105090615.620315-1-martin@geanix.com Signed-off-by: Mark Brown Cc: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm2835.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -1193,7 +1193,6 @@ static int bcm2835_spi_setup(struct spi_ struct spi_controller *ctlr = spi->controller; struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr); struct gpio_chip *chip; - enum gpio_lookup_flags lflags; u32 cs; /* @@ -1261,7 +1260,7 @@ static int bcm2835_spi_setup(struct spi_ spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select, DRV_NAME, - lflags, + GPIO_LOOKUP_FLAGS_DEFAULT, GPIOD_OUT_LOW); if (IS_ERR(spi->cs_gpiod)) return PTR_ERR(spi->cs_gpiod);