Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbaLRCjM (ORCPT ); Wed, 17 Dec 2014 21:39:12 -0500 Received: from mail-qg0-f52.google.com ([209.85.192.52]:41013 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbaLRCjK (ORCPT ); Wed, 17 Dec 2014 21:39:10 -0500 MIME-Version: 1.0 In-Reply-To: <54920597.6090305@ti.com> References: <54907884.2040502@ti.com> <5491ACE6.4070108@ti.com> <54920529.4080007@ti.com> <54920597.6090305@ti.com> Date: Thu, 18 Dec 2014 10:39:08 +0800 X-Google-Sender-Auth: h9Tn8CSdEjWD1hhQLEKzR_hV2jg Message-ID: Subject: Re: How to fix CHECK warning: testing a 'safe expression' ? From: Christopher Li To: Murali Karicheri Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 18, 2014 at 6:37 AM, Murali Karicheri wrote: > if (!ks_pcie) { > dev_err(dev, "no memory for keystone pcie\n"); > return -ENOMEM; > } > pp = &ks_pcie->pp; > > /* initialize SerDes Phy if present */ > phy = devm_phy_get(dev, "pcie-phy"); > ===> if (!IS_ERR_OR_NULL(phy)) { > ret = phy_init(phy); > if (ret < 0) > return ret; > Hi, Do you have a smaller stand alone test case which I can reproduce with sparse? Thanks Chris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/