Commit 566825a3 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Chanwoo Choi
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 9b4aea51
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
	}