Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5911138imu; Mon, 26 Nov 2018 06:49:08 -0800 (PST) X-Google-Smtp-Source: AJdET5dJulK22K6brTGLpIUd0gX3wYrWbRpUHX9/JFUqAD50KW91gUCT+uNIjZx1D6DHr8k8c2y/ X-Received: by 2002:a62:2901:: with SMTP id p1-v6mr27885685pfp.109.1543243748547; Mon, 26 Nov 2018 06:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543243748; cv=none; d=google.com; s=arc-20160816; b=b61RvUVYWpn8TBzR/ZIMi0zTCaA7VIvGUfCGg5W2EL7ClcuauDTi5MZEXpH3ZHJYHc JEAd+k7OsZvlqcGzKibWwzJ6ITly7CeRPpwew9UJoCVmOOyGZelrOddH0r8lZf01mqRP VOCjpVF3fLFL0cljOqrPEDxI5KAikXKg6Ny60JbmW1zbGeyd1EGmdwbRy4vlCUXHF6yl VY3FlQ6ytmp2qgY9wpmc7bowaITOlZPV1PUVrmU7Gql4qkriUuoQNJbsF81CbrGNMcKh 9b0e4kXcpmOF6dqLpqKDFM6ItU0TvhTGtRnFd34HDXAGv6tVwhGeY8TvRHUYvMmGn8lx KRGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rCzXb9bgslmMRM6+xPqKkGqraFKFo4B2ZrIwRkfNPi4=; b=mwakrVYNu52V1kq5KK1zwMOustwUIN/NwTjEj0cKSGTVqznjA5NnRZN41uusnLJN9C qxjH0Z49angn84n98iyahUDXgYK7ssLqmSeipByBz+2BKiVMYfQtF9v7HdqWx8FwNFbY rR+oBSJnTLl8oQ4YuCxwbFDdfdy1d/b0uKca9NrvdIKJ6t0XST9CI6bsng8EDO7E1KPo /w4henInjtHtNDANNHve0FVxAJtvOD1hdpPgpMWyQVFgQKUkogTiMLW6jw7m5mx/wHLt WrgejA9AG92tQGPNLDiYN43oKi4Luk+aCc9nIe34dJPycN+mpxMrN6QVfsE6iQlUzNmV MBHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=lZrkhdO+; 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 t11si459088plo.293.2018.11.26.06.48.41; Mon, 26 Nov 2018 06:49:08 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=lZrkhdO+; 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 S1726987AbeK0Blf (ORCPT + 99 others); Mon, 26 Nov 2018 20:41:35 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:49482 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbeK0Ble (ORCPT ); Mon, 26 Nov 2018 20:41:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=rCzXb9bgslmMRM6+xPqKkGqraFKFo4B2ZrIwRkfNPi4=; b=lZrkhdO+3ujTudcSSy27BEXxqKcToFSV18HQN+AISYmHD7Pc6lZN3ipnGeu317caPjXuK0X2maPZlNFnUZIrVv2gwGlew65cjHz0dLQQ3aIKUXjMrng00ZEg68PYqOFBb057HfG5p06FXVhGHJDgYBbl3rPPalx+C+KdvkVJjXo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gRIAI-0004aq-Li; Mon, 26 Nov 2018 15:47:10 +0100 Date: Mon, 26 Nov 2018 15:47:10 +0100 From: Andrew Lunn To: Harini Katakam Cc: nicolas.ferre@microchip.com, davem@davemloft.net, claudiu.beznea@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com, Harini Katakam , Shubhrajyoti Datta Subject: Re: [PATCH v2 3/4] net: macb: Add pm runtime support Message-ID: <20181126144710.GC12116@lunn.ch> References: <1543216072-9623-1-git-send-email-harini.katakam@xilinx.com> <1543216072-9623-4-git-send-email-harini.katakam@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1543216072-9623-4-git-send-email-harini.katakam@xilinx.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -335,6 +338,10 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum) > int value; > int err; > > + err = pm_runtime_get_sync(&bp->pdev->dev); > + if (err < 0) > + return err; > + > err = macb_mdio_wait_for_idle(bp); > if (err < 0) > return err; Hi Harini Thanks for adding runtime PM support to the MDIO bus. It looks like on the error paths you are not always undoing the pm_runtime_get_sync(). You probably need some sort of goto err; construct. macb_mdio_write() has the same issue. Andrew