Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2224866imm; Thu, 18 Oct 2018 10:59:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ngTq57OZIZSvCPqSdKcO14MzAOHvRXOKxiLj3s1vmA5iS70XEg80zsvJVbpG++zTI5caH X-Received: by 2002:a62:67c3:: with SMTP id t64-v6mr24322709pfj.76.1539885596699; Thu, 18 Oct 2018 10:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885596; cv=none; d=google.com; s=arc-20160816; b=g3rmHjEk/M1gssjqUOKDWfMDKIdCE6bdzcTzGwO025S8W+yoSwZAgQIi0H3nUDjM1r rdBPSRAMDXWmdFKQpGAQuGUPIsdIN+vdwl6SX2atSeNMRXBgxYpLyQoMuzIQh9INYJji qvKOrIK8r0n3lx0yFqUun9FXYYqxnjAkWNpsibnZkUpHPlAQkVZfjiFEAbFGqBjDN6ms FW5E791jm87GG9uJ63sRBAkplOtFSZ/kCdwsJjJNmw3VFckGh02Me9s/p2A4OknO96aZ 32yHuKFmq6u/e3DarRYcbAdjAHdKKlD3hxuXXQVs4KtHbpzcYuKPAAd0O4LhF0c8+DbT w1Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JKd6xRLIvu3F/NuvOs88f/rKFlq2M8Xg8vCFW9c0tZ4=; b=Avk9Pfd/62xkLMricZ5z/oTyrdoKdZBGBlJAetrwLBa67oUsTv5lVOhbUpjph8TfqA iQtZedSTPZ2ZpFWBSfvKq72sW9EAVB9vKh9ZjTePFUhQrLHOZ+HagRdMbbkNWJYMdUme CMWMKKGKe1VQxbuab8dl2FPnnJKhK2fR79DJfnikYDb3rMlDFPOUxe+Jx6hUTMvFqnKU sha3SVR9PSCER3ovFv6uMFxoKas8KqyVymKMf48+zW44vadh3pgX49+fBnIKxt+Pxg6H OfVjSFJlR9/BIvrypuDdV2J+XXiGLWPKhklFWXAEAdb9mtuVA5oCZHAVJZQy44G0dFZ4 D65Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O7adaQBN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24-v6si21725969pgj.28.2018.10.18.10.59.41; Thu, 18 Oct 2018 10:59:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O7adaQBN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729026AbeJSCAY (ORCPT + 99 others); Thu, 18 Oct 2018 22:00:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:48036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbeJSCAX (ORCPT ); Thu, 18 Oct 2018 22:00:23 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 0AF96204FD; Thu, 18 Oct 2018 17:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885497; bh=KpkIhfUWWI2STJw5E1neyY0B7yhgx5EGjKS/7ohjtjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O7adaQBNVCtPNFlpkIL/ELFFbUb6+Obc57ap3KnuEeFrceMRszermlQcKkZ76hfd0 TS7TdcJf5503VV2sFjU276jQYr7wJ5ywk1Kzf2GQ9kEwatihvGph/w2W0PAwiMDJ2a tb0tO6610zc4ziumeYkMHIMgH8oph36ws9QkwTF0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Linus Walleij , Mark Brown , Sasha Levin Subject: [PATCH 4.18 05/53] spi: gpio: Fix copy-and-paste error Date: Thu, 18 Oct 2018 19:53:58 +0200 Message-Id: <20181018175417.531136990@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.561567978@linuxfoundation.org> References: <20181018175416.561567978@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Linus Walleij [ Upstream commit 1723c3155f117ee6e00f28fadf6e9eda4fc85806 ] This fixes an embarrassing copy-and-paste error in the errorpath of spi_gpio_request(): we were checking the wrong struct member for error code right after retrieveing the sck GPIO. Fixes: 9b00bc7b901ff672 ("spi: spi-gpio: Rewrite to use GPIO descriptors") Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -287,8 +287,8 @@ static int spi_gpio_request(struct devic *mflags |= SPI_MASTER_NO_RX; spi_gpio->sck = devm_gpiod_get(dev, "sck", GPIOD_OUT_LOW); - if (IS_ERR(spi_gpio->mosi)) - return PTR_ERR(spi_gpio->mosi); + if (IS_ERR(spi_gpio->sck)) + return PTR_ERR(spi_gpio->sck); for (i = 0; i < num_chipselects; i++) { spi_gpio->cs_gpios[i] = devm_gpiod_get_index(dev, "cs",