lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210916153118.13833-1-caihuoqing@baidu.com>
Date:   Thu, 16 Sep 2021 23:31:18 +0800
From:   Cai Huoqing <caihuoqing@...du.com>
To:     <caihuoqing@...du.com>
CC:     Nick Dyer <nick@...anahar.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] Input: atmel_mxt_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@...du.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 05de92c0293b..36e8365238a4 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -3101,11 +3101,9 @@ static int mxt_parse_device_properties(struct mxt_data *data)
 
 		error = device_property_read_u32_array(dev, keymap_property,
 						       keymap, n_keys);
-		if (error) {
-			dev_err(dev, "failed to parse '%s' property: %d\n",
-				keymap_property, error);
-			return error;
-		}
+		if (error)
+			return dev_err_probe(dev, error,
+					     "failed to parse '%s'\n", keymap_property);
 
 		data->t19_keymap = keymap;
 		data->t19_num_keys = n_keys;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ