Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3546422ybd; Fri, 28 Jun 2019 10:29:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZMIYzK3n2LIUpZakQmWFRG2gnsqJvBq1YkUE/X2e0wAQLUqVcJYdcTwdDE4o/mfigwdzW X-Received: by 2002:a63:c34c:: with SMTP id e12mr10075575pgd.195.1561742958064; Fri, 28 Jun 2019 10:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561742958; cv=none; d=google.com; s=arc-20160816; b=h9hsOPbLJqguY1vXMr0Wk3N/das4iTUljjIMfPO1qQoQ6UO3FpPnpxWDJ3qNXkY1AB zFhX2rtwd9DHGFcQDXdSBZg5MECGU4i025ZSG0T/29q1DMKDrl66F3G5YLY99BFuAHk1 JWJcCkXNKoXXRzMX6O02u6m9mKTxUe3FmdRPw1gNi1VRDtZk5PQx1olrP9A1ljKK67o4 IxCISJLWYq+2yhvEydhD1ZHLYbWhFsUl99n5xvXhRzhz5krXP7WkwBmlFen+Clh0QmJ9 0Rb+VxH59Dx8HmUPVg/UDixuPlbZj8I0W5EkVXUOlBTD0jLUse9XqJMDmE4CZbwe244p DBvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=mLsHJ0i3ujM34GaeB9I76qtU6QknhGyjQmwjCGGHvKA=; b=XOmdg9oEqlcZa5Apz3+O4S5j8LONpDt8245DAl02oOxRoiLwXmBbPstJBXGHhuQWp7 uV09s/HkSEq2LyuXQE9lZ4cEsWK2fuONERDFIAhCS3Pvqg0S7pNVlf3OkFiOaQl7da9M t1jPqOmVlyY5SijgiWRJDKR7m2BBLKkoQwOvxx21orbaCWlW3JxbMF0pFWng6MBwNHPn LEPoWsBoRVGsyiUH/C73aFNlJP88WxU5f2hhxhDhWNWuLpML6jivJLASfxa7uDUd/1Do u+hRx/NPPSlWRXALO2MdOOA01OtcwO2sPUihVbqxPuZY/Pbb20sKbRFAWIyUWWxWATuU Q9bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DqFWfig9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si2504722pgn.70.2019.06.28.10.29.02; Fri, 28 Jun 2019 10:29:18 -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=@gmail.com header.s=20161025 header.b=DqFWfig9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbfF1R15 (ORCPT + 99 others); Fri, 28 Jun 2019 13:27:57 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:37313 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfF1R1z (ORCPT ); Fri, 28 Jun 2019 13:27:55 -0400 Received: by mail-pl1-f193.google.com with SMTP id bh12so3597683plb.4 for ; Fri, 28 Jun 2019 10:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=mLsHJ0i3ujM34GaeB9I76qtU6QknhGyjQmwjCGGHvKA=; b=DqFWfig9P23wc62pGuCwg0dPMtOsYiK0zWh3xIxvl5JzYBwvaQKkg9HU4XJE8efjSv RAPjqCv9RtEiWWBU54T7ZQjutf2/Vba2BKCaBGU6OVQG/Qox4QIh/+LNJmCWPmn7XU/Y P+DGF4KaRrLTioPue9TpH+SGQj5jyu2NrPKfLbFpMyeOYC4krOtjwaWsXe/vwp3mB6F6 XsBoPEaaMUEadLLKpKTmMWwCPDAIQe5iCzmOR2HBfGxPrYpfvQq+LbkHqPNr6DwQR496 2OKW/5fOvrR07JLR/HRzROi0gHV9XIZuMQtKN3euZvDHC6YTukkFq1F/HzqescBKHxXT hp5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=mLsHJ0i3ujM34GaeB9I76qtU6QknhGyjQmwjCGGHvKA=; b=qVnRu06WNiUO0pP/HTvxEtW1jQ4ccE0K90yCvugGZ7JEXdFf36g536UQO/t92VESw+ vnsyiLtCU0+j1Sb1NRlfRrDQq1X4bTHeSYsRxnj1gffxd3MueVKAciayt7AhoZofMYUh J6a2TnjrdZBPPNsAyJJn3TmmU6wFm/Mhsrk5Euc1Uwn1KP31HzLP81qFjnm7YlLk+xwF Tmc2JZ5F3++M+bs5NH2fyoSnts6NgEtyrMBh+OZSbNptdLZDA7NxIpdfIVauePDyLPLQ s0wEaU+3WFvd2+a49au6Q3HTmfHKGVg9W/ikcviv15OB4RyB2wpnlY5TM19rLa8IikIT ww4g== X-Gm-Message-State: APjAAAVg4iD2F30hY9vUzys8dPNkZ61s5xnDCK1o3Ii5MfSb1dMzsCv1 AGzA0ixNoOoe9udNRMZJrhXe3hQ6yGkxzg== X-Received: by 2002:a17:902:bf08:: with SMTP id bi8mr13291525plb.189.1561742875096; Fri, 28 Jun 2019 10:27:55 -0700 (PDT) Received: from localhost.localdomain ([183.83.73.90]) by smtp.gmail.com with ESMTPSA id k19sm2070490pgl.42.2019.06.28.10.27.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2019 10:27:54 -0700 (PDT) From: Harsh Jain To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, harshjain32@gmail.com, harshjain.prof@gmail.com Subject: [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning Date: Fri, 28 Jun 2019 22:57:24 +0530 Message-Id: <20190628172724.2689-3-harshjain32@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190628172724.2689-2-harshjain32@gmail.com> References: <20190628172724.2689-1-harshjain32@gmail.com> <20190628172724.2689-2-harshjain32@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It fixes "Using plain integer as NULL pointer" sparse warning. Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c index 204f33d0dc69..155da641e3a2 100644 --- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c +++ b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c @@ -679,9 +679,9 @@ static int pi2c_remove(struct platform_device *pldev) //pci_set_drvdata(dev, NULL); //cdev_del(&lddev->cdev); - if(lddev != 0) { + if(lddev != NULL) { kfree(lddev); - pldev->dev.platform_data = 0; + pldev->dev.platform_data = NULL; } return 0; -- 2.17.1