[PATCH 3.16 158/245] chardev: Avoid potential use-after-free in 'chrdev_open()'