Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: colibri-vf50-ts - make use of the helper function dev_err_probe()

When possible use dev_err_probe help to properly deal with the
PROBE_DEFER error, the benefit is that DEFER issue will be logged
in the devices_deferred debugfs file.
Using dev_err_probe() can reduce code size, and the error value
gets printed.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210916153148.14045-1-caihuoqing@baidu.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Cai Huoqing and committed by
Dmitry Torokhov
105a0c76 ed7687c7

+3 -7
+3 -7
drivers/input/touchscreen/colibri-vf50-ts.c
··· 239 239 static int vf50_ts_get_gpiod(struct device *dev, struct gpio_desc **gpio_d, 240 240 const char *con_id, enum gpiod_flags flags) 241 241 { 242 - int error; 243 - 244 242 *gpio_d = devm_gpiod_get(dev, con_id, flags); 245 - if (IS_ERR(*gpio_d)) { 246 - error = PTR_ERR(*gpio_d); 247 - dev_err(dev, "Could not get gpio_%s %d\n", con_id, error); 248 - return error; 249 - } 243 + if (IS_ERR(*gpio_d)) 244 + return dev_err_probe(dev, PTR_ERR(*gpio_d), 245 + "Could not get gpio_%s\n", con_id); 250 246 251 247 return 0; 252 248 }