linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
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
Date: Mon, 28 Dec 2015 01:33:15 +0800	[thread overview]
Message-ID: <20151227173314.GA10916@lkp-hsx03> (raw)
In-Reply-To: <942d2d3ba128ee9597e02144cc913273433d42d5.1451231697.git.oreste.salerno@tomtom.com>

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 <oreste.salerno@tomtom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 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();

  parent reply	other threads:[~2015-12-27 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 16:21 [PATCH 0/3] Add device tree support to the cyttsp driver Oreste Salerno
2015-12-27 16:21 ` [PATCH 1/3] Input: cyttsp - remove unused irq_gpio from platform_data Oreste Salerno
2015-12-27 16:21 ` [PATCH 2/3] Input: cyttsp - add device tree support Oreste Salerno
2015-12-27 17:33   ` kbuild test robot
2015-12-27 17:33   ` kbuild test robot [this message]
2015-12-27 16:21 ` [PATCH 3/3] Input: cyttsp - add default init function Oreste Salerno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151227173314.GA10916@lkp-hsx03 \
    --to=lkp@intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fery@cypress.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kbuild-all@01.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=oreste.salerno@tomtom.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).