From patchwork Sun Dec 27 17:33:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 7923991 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0EAFBEEE5 for ; Sun, 27 Dec 2015 17:34:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1BB320272 for ; Sun, 27 Dec 2015 17:34:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C57F20265 for ; Sun, 27 Dec 2015 17:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753754AbbL0ReW (ORCPT ); Sun, 27 Dec 2015 12:34:22 -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 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 27 Dec 2015 09:34:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,486,1444719600"; d="scan'208";a="715707176" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 27 Dec 2015 09:34:17 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1aDFCw-000HZw-5x; Mon, 28 Dec 2015 01:34:14 +0800 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-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-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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();