[PATCH 5.10 381/783] chardev: fix error handling in cdev_device_add()