[PATCH 5.11 122/152] extcon: Fix error handling in extcon_dev_register