Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1636510imu; Wed, 12 Dec 2018 01:25:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/V2O+4nkisD7Lc72Ijl2YaJAK4DN7UwQ+J1HJPQxdGvW2MpPaI0cRoYWZxkc3hraaHUQw2q X-Received: by 2002:a17:902:6948:: with SMTP id k8mr18936334plt.2.1544606750030; Wed, 12 Dec 2018 01:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544606750; cv=none; d=google.com; s=arc-20160816; b=FpozflXYeDNxqvrM565Dw2YdTLC/I1pYk36qBFoBEGS9DSK0yKwN00qplFjR1EIG7N +lUrUcGDzvt1As09TLbAlKUMnpcDQ1dk+YxIFsLL0E+8TpJnS+lZyuqJ0T9v473+WROn UmaSdBWQbVzwQ3VdmVfZldgWEuVpLYtv2TmmJcT+SNq0psqamFKQxWAa9k7kA+XZCGPI TZ1S7V7oahL3OpT7TwaHvZdZ65pBkMR8k5bS4Q+qlYoweoQbvG6DubToZJAHeAJ/AL7k N2+yAypwZyh8Qxc8tJGIPr2EK9Guux5BYu7QtSLyXkqJn/TeT1sWYMr1F5MltH7s+N+o fM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=GI8PwVGLv9lDcJiISFNzE3nRH3SJdbKONO4RXkZ7+7E=; b=MMYwhipGjgriVcOEDWrLx7sUE36AN9aCDk97uDbgad/ap5VwVzdb0Im6TOLAh1FuVD VkS0INPvsbDflQ2fuFpJlLl6m+HQIwcqb01aOg/2Z0chfSQ3tSzF5+PGtzxH5F9aQQbf L9Gk9/nYoze2EVjARImsS0g0Eucddw4hDEBa1E6Her4aYq/EGVm3Z392MzCMt1Za6yj7 YU/nSi9zLvmVaPtzo2VzWnOlfBuWihRQrq4uJvsuUobVYfjhFNnQw+cgBfR/qU0QNPH9 z8H8R5EWxz1LsaP9zOmCSPBb4agBVpiLhjbp0gJgFcHFuH9Zdf5K2pMniCJrZNg4VmMX hq8A== 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 26si14209955pgq.402.2018.12.12.01.25.11; Wed, 12 Dec 2018 01:25:50 -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; 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 S1726710AbeLLJYV (ORCPT + 99 others); Wed, 12 Dec 2018 04:24:21 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:50457 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726514AbeLLJYV (ORCPT ); Wed, 12 Dec 2018 04:24:21 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3C50633DBC8A7; Wed, 12 Dec 2018 17:24:18 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.408.0; Wed, 12 Dec 2018 17:24:10 +0800 From: YueHaibing To: , , CC: , , , YueHaibing Subject: [PATCH net-next] can: flexcan: fix 'passing zero to ERR_PTR()' warning Date: Wed, 12 Dec 2018 17:24:01 +0800 Message-ID: <20181212092401.25612-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix a static code checker warning: drivers/net/can/flexcan.c:1435 flexcan_setup_stop_mode() warn: passing zero to 'PTR_ERR' Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Signed-off-by: YueHaibing --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 0f36eaf..5f09764 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -1432,7 +1432,7 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) gpr_np = of_find_node_by_phandle(phandle); if (!gpr_np) { dev_dbg(&pdev->dev, "could not find gpr node by phandle\n"); - return PTR_ERR(gpr_np); + return -ENODEV; } priv = netdev_priv(dev); -- 2.7.0