[PATCH 6.0 0711/1073] chardev: fix error handling in cdev_device_add()