[PATCH AUTOSEL 6.0 07/18] chardev: Fix potential memory leak when cdev_add() failed