mediatek: correctly log i2c response
authorSven Wegener <sven.wegener@stealer.net>
Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 11 Sep 2022 19:26:41 +0000 (20:26 +0100)
The read response is in the i2c_response variable. Also use %hhx format,
because we're dealing with a single char.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
target/linux/mediatek/files/drivers/leds/leds-ubnt-ledbar.c

index 9f12cda5d196a944d51097537c95a85f6630db37..9bfe0e62f4926cd269e3bbc0c9e263a658b06f65 100644 (file)
@@ -74,14 +74,14 @@ static int ubnt_ledbar_apply_state(struct ubnt_ledbar *ledbar)
 
        i2c_response = ubnt_ledbar_perform_transaction(ledbar, setup_msg);
        if (i2c_response != UBNT_LEDBAR_TRANSACTION_SUCCESS) {
-               dev_err(&ledbar->client->dev, "Error initializing LED transaction: %02x\n", ret);
+               dev_err(&ledbar->client->dev, "Error initializing LED transaction: %02hhx\n", i2c_response);
                ret = -EINVAL;
                goto out_gpio;
        }
 
        i2c_response = ubnt_ledbar_perform_transaction(ledbar, led_msg);
        if (i2c_response != UBNT_LEDBAR_TRANSACTION_SUCCESS) {
-               dev_err(&ledbar->client->dev, "Failed LED transaction: %02x\n", ret);
+               dev_err(&ledbar->client->dev, "Failed LED transaction: %02hhx\n", i2c_response);
                ret = -EINVAL;
                goto out_gpio;
        }