[PATCH 5.4 305/658] chardev: fix error handling in cdev_device_add()