Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3001299yba; Mon, 22 Apr 2019 17:33:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyV+lc7KjURvjzlKcPh18q3IDwaABXeVdM7dATpTzy4EuJFMpxRWCrwUoifhGdpdp9BlbMO X-Received: by 2002:a65:424b:: with SMTP id d11mr3607709pgq.205.1555979594351; Mon, 22 Apr 2019 17:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555979594; cv=none; d=google.com; s=arc-20160816; b=Waicy9kSMWItn/mJM1fLHaA1ZE4TlBdZtZ3HEhX1bxKlJcauXwyPHTz3QspsHQNrh6 1nGVMuj6kC6bgsTYlYXCYbsXVgE0f6cH1o6KrdZkM5BR/SdnfQkA/+6dG2tKM4+jt9pw d4IXGqbFhh8NL19LIaxi+y3faVBJowtXZyItd7uZ4UPbqzex4tZGXGeW1XNTnO9OQBho WXNBqpF24s/9nRqTtrnrwgGWh1jLulJzNOx0lvZrLXj7WqkxwuYs0P/wAJUKoXQtuzpi rTGDZTuhmHKH3US1y26lhjtunyhXlJHW6H8oW6TAfAhikLwwXV0EodCoPpiFc9VaGYy6 WngQ== 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=mxOFF4FYNmSprqF+I5YMk+NVi6oEy6aDl1xoZ6A6K8o=; b=rMkd7lUeX4s1Zsi0Xr/dhG3yoV5IFjjeqYDINaMbI7XLTYSiHYKK7T3XzvKSnoJbWh YPMgWNTn5q7npAOTQXOgGFqDJL1OvRHz7DiTEF2RX7/qxN75oZkv2iqQ5MlTU4MsKEzg g/zGt668kmMRxf134MHdB1Z7+3ojKVRsh2DjuQM6dT0RFl6EmMmeifR754iT4vzmKTxm JJfb90ERfRTzeA04p+vAxWEeTSZC3hdvT5EQupGA6iqrYN8jF2mKQd3boWQ+T/bKax1G isooqvRBFIMl8MG/wEqDMXUQJMpCXFfUmkjPy2A3a6SYd9EBxf+CNzhmCN2r67rggMaT jDiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="SIq1/2yu"; 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 u71si13478427pgd.147.2019.04.22.17.32.59; Mon, 22 Apr 2019 17:33:14 -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="SIq1/2yu"; 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 S1732521AbfDVUJe (ORCPT + 99 others); Mon, 22 Apr 2019 16:09:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729135AbfDVTnQ (ORCPT ); Mon, 22 Apr 2019 15:43:16 -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 4D1802175B; Mon, 22 Apr 2019 19:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962196; bh=1bZIL/QYHlOKjN/CixIYQdEAGKot+QR6LvjkEoVi0C8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIq1/2yuPy43WrS6G1tZeTSbdlm+p8TFy0nu1bCjT2ddPQlHk5k1pYEfhqPyfK0pL zARkKGT3z7X0vdj7oThOb31alHHuN1nUFzqCL+EocB7WciyvJSN748SMDpTrCiBNhU GAjtsekay99HV0aWxAETL8zrBeoeWCrnwgrnrnLQ= 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 5.0 38/98] net: ks8851: Reassert reset pin if chip ID check fails Date: Mon, 22 Apr 2019 15:41:05 -0400 Message-Id: <20190422194205.10404-38-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194205.10404-1-sashal@kernel.org> References: <20190422194205.10404-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 @@ err_netdev: 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