From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 29 Oct 2022 23:18:38 +0200
Subject: input: pinephone-keyboard: Don't print error when the keyboard is not
 connected

This is needlessly nosiy for people who don't have KB connected, or
don't own one.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/input/keyboard/pinephone-keyboard.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
index f758c1eabe40..ceeb26069c8f 100644
--- a/drivers/input/keyboard/pinephone-keyboard.c
+++ b/drivers/input/keyboard/pinephone-keyboard.c
@@ -353,6 +353,11 @@ static int ppkb_probe(struct i2c_client *client)
 	ret = i2c_smbus_read_i2c_block_data(client, 0, sizeof(info), info);
 	if (ret != sizeof(info)) {
 		error = ret < 0 ? ret : -EIO;
+		if (error == -ENXIO) {
+			dev_info(dev, "Keyboard was not found on the I2C bus, maybe it's disconnected.\n");
+			return error;
+		}
+
 		dev_err(dev, "Failed to read device ID: %d\n", error);
 		return error;
 	}
-- 
Armbian

