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: wdt87xx_i2c - switch to use dev_err_probe()

Switch to use dev_err_probe() to simplify the error path and
unify a message template. With that being done, drop the now no-op
message for -ENOMEM as allocator will print a big warning anyway
and remove duplicate message for devm_request_threaded_irq().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082445.44186-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Andy Shevchenko and committed by
Dmitry Torokhov
3033da61 b58a2c1a

+4 -10
+4 -10
drivers/input/touchscreen/wdt87xx_i2c.c
··· 1026 1026 int error; 1027 1027 1028 1028 input = devm_input_allocate_device(dev); 1029 - if (!input) { 1030 - dev_err(dev, "failed to allocate input device\n"); 1029 + if (!input) 1031 1030 return -ENOMEM; 1032 - } 1033 1031 wdt->input = input; 1034 1032 1035 1033 input->name = "WDT87xx Touchscreen"; ··· 1051 1053 INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); 1052 1054 1053 1055 error = input_register_device(input); 1054 - if (error) { 1055 - dev_err(dev, "failed to register input device: %d\n", error); 1056 - return error; 1057 - } 1056 + if (error) 1057 + return dev_err_probe(dev, error, "failed to register input device\n"); 1058 1058 1059 1059 return 0; 1060 1060 } ··· 1092 1096 NULL, wdt87xx_ts_interrupt, 1093 1097 IRQF_ONESHOT, 1094 1098 client->name, wdt); 1095 - if (error) { 1096 - dev_err(&client->dev, "request irq failed: %d\n", error); 1099 + if (error) 1097 1100 return error; 1098 - } 1099 1101 1100 1102 return 0; 1101 1103 }