spmi: Remove redundant dev_name() print in spmi_device_add()

Function spmi_device_add() uses dev_{dbg,err}() for respectively
debug and error prints, and passes the same device pointer as both
the dev_{dbg,err}() parameters and to a dev_name() that is part of
the actual message.
This means that the device name gets printed twice!

Remove the redundant dev_name() from the messages.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
AngeloGioacchino Del Regno 2026-07-21 11:36:16 +02:00 committed by Stephen Boyd
parent f7aa9de4f2
commit 91363e6bcd
No known key found for this signature in database
GPG Key ID: AD028897C6E49525

View File

@ -69,12 +69,11 @@ int spmi_device_add(struct spmi_device *sdev)
err = device_add(&sdev->dev);
if (err < 0) {
dev_err(&sdev->dev, "Can't add %s, status %d\n",
dev_name(&sdev->dev), err);
dev_err(&sdev->dev, "Can't add device, status %d\n", err);
goto err_device_add;
}
dev_dbg(&sdev->dev, "device %s registered\n", dev_name(&sdev->dev));
dev_dbg(&sdev->dev, "device registered\n");
err_device_add:
return err;