Skip to content

Commit 566825a

Browse files
andy-shevchanwoochoi
authored andcommitted
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>
1 parent 9b4aea5 commit 566825a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/extcon/extcon.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,9 +1362,8 @@ void extcon_dev_unregister(struct extcon_dev *edev)
13621362
list_del(&edev->entry);
13631363
mutex_unlock(&extcon_dev_list_lock);
13641364

1365-
if (IS_ERR_OR_NULL(get_device(&edev->dev))) {
1366-
dev_err(&edev->dev, "Failed to unregister extcon_dev (%s)\n",
1367-
dev_name(&edev->dev));
1365+
if (!get_device(&edev->dev)) {
1366+
dev_err(&edev->dev, "Failed to unregister extcon_dev\n");
13681367
return;
13691368
}
13701369

0 commit comments

Comments
 (0)