mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
f7aa9de4f2
commit
91363e6bcd
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user