[PATCH openEuler-1.0-LTS 23/49] chardev: fix error handling in cdev_device_add()