[PATCH 5.15 485/731] chardev: fix error handling in cdev_device_add()