[PATCH 4.14 174/338] chardev: fix error handling in cdev_device_add()