[PATCH AUTOSEL 5.10 06/11] chardev: Fix potential memory leak when cdev_add() failed