[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170708195227.GA79324@lkp-wsx02>
Date: Sun, 9 Jul 2017 03:52:27 +0800
From: kbuild test robot <lkp@...el.com>
To: sathyanarayanan.kuppuswamy@...ux.intel.com
Cc: kbuild-all@...org, peda@...ntia.se, linux-kernel@...r.kernel.org,
sathyaosid@...il.com,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Subject: [PATCH] mux: fix err_cast.cocci warnings
drivers/mux/mux-core.c:491:9-16: WARNING: ERR_CAST can be used with mux_chip
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
Fixes: 1203d8a531ed ("mux: Add new API to get mux_control ref by device name.")
CC: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
mux-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mux/mux-core.c
+++ b/drivers/mux/mux-core.c
@@ -488,7 +488,7 @@ struct mux_control *mux_control_get_by_i
mux_chip = mux_chip_get_by_index(devname, chip_index);
if (IS_ERR(mux_chip))
- return ERR_PTR(PTR_ERR(mux_chip));
+ return ERR_CAST(mux_chip);
if (ctrl_index >= mux_chip->controllers) {
dev_err(&mux_chip->dev,
Powered by blists - more mailing lists