Thread (6 messages) flat view 6 messages, 2 authors, 2015-12-27
STALE3875d

[PATCH] Input: fix err_cast.cocci warnings

From: kbuild test robot <hidden>
Date: 2015-12-27 17:34:23
Also in: lkml

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 <redacted>
Signed-off-by: Fengguang Wu <redacted>
---

 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();
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help