extcon: Remove dup device name in the message and unneeded error check

JIRA: https://issues.redhat.com/browse/RHEL-37673

commit 566825a31f65da111270abac35662502706e7c8a
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 22 Mar 2023 16:40:02 +0200

  The device name is already printed with dev_err(), no need to repeat.
  The device pointer itself is not supposed to be an error point, drop
  that check.

  Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Signed-off-by: Desnes Nunes <desnesn@redhat.com>
This commit is contained in:
Desnes Nunes 2024-06-10 14:27:46 -03:00
parent 1c62d44921
commit cbb6606a2c
1 changed files with 2 additions and 3 deletions

View File

@ -1362,9 +1362,8 @@ void extcon_dev_unregister(struct extcon_dev *edev)
list_del(&edev->entry);
mutex_unlock(&extcon_dev_list_lock);
if (IS_ERR_OR_NULL(get_device(&edev->dev))) {
dev_err(&edev->dev, "Failed to unregister extcon_dev (%s)\n",
dev_name(&edev->dev));
if (!get_device(&edev->dev)) {
dev_err(&edev->dev, "Failed to unregister extcon_dev\n");
return;
}