Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp431067img; Wed, 20 Mar 2019 03:47:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrgYIxYIiLrJm9kqwLx531tI0affO1SNdsZcwz7QnGGOgow7Cvec3bAKiXgDZ6+e5MkAle X-Received: by 2002:a65:4145:: with SMTP id x5mr6619023pgp.144.1553078861299; Wed, 20 Mar 2019 03:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553078861; cv=none; d=google.com; s=arc-20160816; b=P2CnJlu/QJayXB7iLsTT/fhmHR/Ow7RmIKH+TWPIsG13bLEm4/hHahJ4vWTshdHyBe 6Z2CY6pm5PEJZ2df1ZDcULrJT6H0q+SsHCeSBuVMeLQ3Iy1sUD/DianYRnl9BmNh+qnk e7uRebLk6R+o8basJwbGFG18jcGDBxCFSWPkskVHeXhgBz3pxHW3JJ1ThbZIVO4l7gGw 3NPe0yaDHZWaO8xIW/3+gnObWqhWnfUZ3pUpAfdM3lUlJb1ns8/YQiLySP4bSuYX2Zhh TelLWGT3fZQ9cYEFDS5VYyph9FPNWj5XuahQNiglalNvWTWkH/UXUjDdX57pcb4Q61XB UTIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=1N0WovuFJcK1Y3w5s7NmQZB+eZFDUE7KETPZdg9U0gA=; b=hu7t2QW1xs+iV+1jxVDcNWdJARrul7rWwmkvbe+2EvOaD7axq+fb90Gk0YlCoFXCX9 BV7bZf6Eg1trmNn4WhbJqZNuS1JxMAu0rbWP60cxnmCYeMDso7wGViwi+eKFFl557FUn tXT95b9MDRV7aPB+b/KJeTZbGBQvDHiKYw5ykkBK+Vk0nLC/CfxTK6OqQx2Q22ftk+6F NHP2Ppuom7C5FMZDXNWVMHCqT0QCvcLJgWRYq2wFJVZHMqFWtvUuK9dmzWucD0dxRnJW uqPenJOC0Q4qw4ZEVeRZEYC4P7FJPH88sBcr7gU93t/Nyh4hEhNLZNFHWizRn2b/1LUd LHbg== ARC-Authentication-Results: i=1; mx.google.com; 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 31si1612570plb.39.2019.03.20.03.47.26; Wed, 20 Mar 2019 03:47:41 -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; 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 S1727889AbfCTKqe (ORCPT + 99 others); Wed, 20 Mar 2019 06:46:34 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:36749 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfCTKqd (ORCPT ); Wed, 20 Mar 2019 06:46:33 -0400 Received: by mail-oi1-f196.google.com with SMTP id t206so1404752oib.3; Wed, 20 Mar 2019 03:46:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1N0WovuFJcK1Y3w5s7NmQZB+eZFDUE7KETPZdg9U0gA=; b=ZJwBuOvsW4a8lfaiVm69K/PKae0H9qgGZLjZpFLkckd/V1R87BhIyY+mKyH5yRld3y xr5PJQ2jRjhvtwGl3FjzVsMEMP6+EofEe/Vd8aSo897Uc0BaW6m9C0dK46k7uimLjNhq P8R+BzdStgHpV1u2A/SSAk25lbPu0/QnEUafd2rg+A2yOAGjN90SLUW4sc8N2VzfafPQ 4SKVx1sFqLENBXmvWzwq3b4NUTcv26ear0ww3unL4JDAY2g7kqxPDL7J/EnW4q+xH+OQ pxiy/8paZF7NJv0uP7pzXMuOb/Se6uZwmWVT+sMIlUpWgmL3r2hPsT6KNdIjDbUIKVun +AIQ== X-Gm-Message-State: APjAAAVawwxOZ34db9BSBcd7uY5MpYDBY//S223u/4ewpDxwQ6Zk6Trk dG17ygUCcfDgEavnWy+QtTD0Rro+x/uTCl2iQsQ= X-Received: by 2002:aca:304e:: with SMTP id w75mr4725561oiw.176.1553078792888; Wed, 20 Mar 2019 03:46:32 -0700 (PDT) MIME-Version: 1.0 References: <1552974845-1590-1-git-send-email-harini.katakam@xilinx.com> <74d29e0e-d55e-e983-add1-361f7c4af948@microchip.com> In-Reply-To: <74d29e0e-d55e-e983-add1-361f7c4af948@microchip.com> From: Harini Katakam Date: Wed, 20 Mar 2019 16:16:22 +0530 Message-ID: Subject: Re: [RFC PATCH] net: macb: Add null check for PCLK and HCLK To: Claudiu Beznea Cc: Harini Katakam , Nicolas Ferre , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Claudiu, On Tue, Mar 19, 2019 at 9:51 PM wrote: > > > > On 19.03.2019 07:54, Harini Katakam wrote: > > - if (IS_ERR(*pclk)) { > > + if (IS_ERR(*pclk) || (*pclk == NULL)) { > > You can use IS_ERR_OR_NULL() macro. > Yes will fix, thanks. Also the error code from this function will end up being 0 below even if pointer is NULL. Will fix that. Regards, Harini > > err = PTR_ERR(*pclk); > > dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err); > > return err; > > }