[PATCH 4.4 02/28] chardev: Avoid potential use-after-free in chrdev_open()