[PATCH] input: adp5589-keys: Add err log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: jiangzhipeng <jiangzhipeng@xxxxxxxxxx>

When devm_gpiochip_add_data() failed ,print err log

Signed-off-by: jiangzhipeng <jiangzhipeng@xxxxxxxxxx>
---
 drivers/input/keyboard/adp5589-keys.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 654e047..e99c0bd 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -526,8 +526,10 @@ static int adp5589_gpio_add(struct adp5589_kpad *kpad)
 	mutex_init(&kpad->gpio_lock);
 
 	error = devm_gpiochip_add_data(dev, &kpad->gc, kpad);
-	if (error)
+	if (error) {
+		dev_err(dev, "devm_gpiochip_add_data() failed, err: %d\n", error);
 		return error;
+	}
 
 	for (i = 0; i <= kpad->var->bank(kpad->var->maxgpio); i++) {
 		kpad->dat_out[i] = adp5589_read(kpad->client, kpad->var->reg(
-- 
1.9.1





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux