From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754123AbbL0ReX (ORCPT ); Sun, 27 Dec 2015 12:34:23 -0500 Received: from mga14.intel.com ([192.55.52.115]:60038 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbbL0ReU (ORCPT ); Sun, 27 Dec 2015 12:34:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,486,1444719600"; d="scan'208";a="715707176" Date: Mon, 28 Dec 2015 01:33:15 +0800 From: kbuild test robot To: Oreste Salerno Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, fery@cypress.com, dmitry.torokhov@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, oreste.salerno@tomtom.com Subject: [PATCH] Input: fix err_cast.cocci warnings Message-ID: <20151227173314.GA10916@lkp-hsx03> References: <201512280113.AVgpxiIx%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <942d2d3ba128ee9597e02144cc913273433d42d5.1451231697.git.oreste.salerno@tomtom.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/input/touchscreen/cyttsp_core.c:637:9-16: WARNING: ERR_CAST can be used with pdata Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci CC: Oreste Salerno Signed-off-by: Fengguang Wu --- cyttsp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -634,7 +634,7 @@ struct cyttsp *cyttsp_probe(const struct pdata = cyttsp_get_platform_data(dev); if (IS_ERR(pdata)) - return ERR_PTR(PTR_ERR(pdata)); + return ERR_CAST(pdata); ts = kzalloc(sizeof(*ts) + xfer_buf_size, GFP_KERNEL); input_dev = input_allocate_device();