[PATCH 4.9 141/251] chardev: fix error handling in cdev_device_add()