summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-03-22 17:40:02 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2023-05-29 17:41:29 +0300
commit566825a31f65da111270abac35662502706e7c8a (patch)
treebfd793c7ce3b10375b41ede17c9150e7a3eb1a8f
parent9b4aea51cbcaefacaac655392f360bb3929ab63d (diff)
downloadlinux-566825a31f65da111270abac35662502706e7c8a.tar.xz
extcon: Remove dup device name in the message and unneeded error check
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>
-rw-r--r--drivers/extcon/extcon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 89b3946b3123..47819c5144d5 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -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;
}