Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2982443yba; Mon, 22 Apr 2019 17:08:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtPoVE3IvnuT0otuWPkEZB9KJXqgbiX4nlNNoDHUdAI/mTFwQrdTqmD5BwwHif82GuST+5 X-Received: by 2002:a62:ab12:: with SMTP id p18mr23650948pff.216.1555978096462; Mon, 22 Apr 2019 17:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555978096; cv=none; d=google.com; s=arc-20160816; b=p5kWM/U+GQt0U3V132dCnY9Ld7fEVTCNx5cq0bDqZy7BFQ2pVPojYxo+VaWe2CVUsG nYFmJd5iVnujA3+oQgCFNN97sBShmB9KnzclBFPlhkmI/kabwWKBTtyB81nn0HPUE+pF J0TFClD3/JVu6+XN6wofMdR35W4O76ZmEbZQMTGEwbqUJ1wfBpMLnQXOv9nRZhyMhje0 8SOwgqyviStjPWVKrSny/qo2wKAzigQq7ggmRFoTVNqqFZhVTdH/3x4kH34YLUe0hwxk f88/KPgkUcrJ6SWj+QXZAwFYAQNrLwd5pBn9wWn/K1E/dq6voS3irqYYUssrbrqE7EpN LjZg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4P8IuW50WP0jOOfSXDxhqG1uiIGJQVSu2l7PAduiJe8=; b=CjduvZbGa5nk1xAKY9B8ac5S4XC6p6NAEQp15egC0+cMhGmmZTwh4NaQy1OKdC+lXf JNN2y/sSZG92Bn5QCR09HXM3ZQB39fpA9J6XfGnVqoypp6MHSAc5Ea0X0WcR57rcb59o /Ea21Xvp56Ff578IorO9JxmSlIJd4I7arC4G0xTCQFZqiwJEGXbWxU6KEU2AJ1KvNH0w DFjqY5hReP6z3QhkPnZpr8BR4v8znw/kPuc9Ef04VsdTOkfX26YtN06sasKJ7WpzDKwj kK+qRgeVT+NLSbcLFhAIWGUy8QTwRBsEryHKGI3WtYeGLqg/v14BUZ6W0Zc6RsxuadCC F+XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xi89oqKx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si14647393pfa.163.2019.04.22.17.08.01; Mon, 22 Apr 2019 17:08:16 -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=Xi89oqKx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732083AbfDVUC6 (ORCPT + 99 others); Mon, 22 Apr 2019 16:02:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:48388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729948AbfDVTqO (ORCPT ); Mon, 22 Apr 2019 15:46:14 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 21B23218DA; Mon, 22 Apr 2019 19:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962374; bh=S+CvoNXiAqZgE3LfDz5kEpun8CaKRMNjQOlLvMpI5Hc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xi89oqKxp34hk5bffg09RxWInOWplNfgNjTgJC1oWqAk6JBxXpr+OXnmsjN4uSWLf o7nwsRNyAVpnrboml7ElJ6pxyLCeUP3es/93iUHlSBbs+iTW/0xkAV0vJFwv+Iyieh L9GAy6r77VSk3NaXMzRMOsBfrmIqZR1GT6RrU+Pg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lukas Wunner , Frank Pavlic , Stephen Boyd , Nishanth Menon , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 28/68] net: ks8851: Reassert reset pin if chip ID check fails Date: Mon, 22 Apr 2019 15:44:36 -0400 Message-Id: <20190422194516.11634-28-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194516.11634-1-sashal@kernel.org> References: <20190422194516.11634-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lukas Wunner [ Upstream commit 761cfa979a0c177d6c2d93ef5585cd79ae49a7d5 ] Commit 73fdeb82e963 ("net: ks8851: Add optional vdd_io regulator and reset gpio") amended the ks8851 driver to briefly assert the chip's reset pin on probe. It also amended the probe routine's error path to reassert the reset pin if a subsequent initialization step fails. However the commit misplaced reassertion of the reset pin in the error path such that it is not performed if the check of the Chip ID and Enable Register (CIDER) fails. The error path is therefore slightly asymmetrical to the probe routine's body. Fix it. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Stephen Boyd Cc: Nishanth Menon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/ethernet/micrel/ks8851.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index a93f8e842c07..1633fa5c709c 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c @@ -1554,9 +1554,9 @@ static int ks8851_probe(struct spi_device *spi) free_irq(ndev->irq, ks); err_irq: +err_id: if (gpio_is_valid(gpio)) gpio_set_value(gpio, 0); -err_id: regulator_disable(ks->vdd_reg); err_reg: regulator_disable(ks->vdd_io); -- 2.19.1