[PATCH 6.1 0734/1146] chardev: fix error handling in cdev_device_add()