diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-22 16:40:02 +0200 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2023-04-03 23:22:06 +0900 |
commit | 22349cb0b86e6d2c28b8919ecb4bdc546bb5e595 (patch) | |
tree | 864b68be81a3503032fe008dc8166389bf342ae8 /drivers/extcon | |
parent | ff6decd12868f0847e8b689cd913273ccefdebde (diff) | |
download | linux-next-22349cb0b86e6d2c28b8919ecb4bdc546bb5e595.tar.gz |
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index 613b390a7c6e..1ed1dbca1ebe 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; } |