[PATCH openEuler-1.0-LTS 1/2] extcon: Fix error handling in extcon_dev_register