Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Chanwoo Choi
566825a3 9b4aea51

+2 -3
+2 -3
drivers/extcon/extcon.c
··· 1362 1362 list_del(&edev->entry); 1363 1363 mutex_unlock(&extcon_dev_list_lock); 1364 1364 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"); 1368 1367 return; 1369 1368 } 1370 1369