Loading fs/char_dev.c +14 −7 Original line number Diff line number Diff line Loading @@ -386,14 +386,21 @@ static int chrdev_open(struct inode *inode, struct file *filp) cdev_put(new); if (ret) return ret; ret = -ENXIO; filp->f_op = fops_get(p->ops); if (!filp->f_op) { cdev_put(p); return -ENXIO; } if (filp->f_op->open) if (!filp->f_op) goto out_cdev_put; if (filp->f_op->open) { ret = filp->f_op->open(inode,filp); if (ret) goto out_cdev_put; } return 0; out_cdev_put: cdev_put(p); return ret; } Loading Loading
fs/char_dev.c +14 −7 Original line number Diff line number Diff line Loading @@ -386,14 +386,21 @@ static int chrdev_open(struct inode *inode, struct file *filp) cdev_put(new); if (ret) return ret; ret = -ENXIO; filp->f_op = fops_get(p->ops); if (!filp->f_op) { cdev_put(p); return -ENXIO; } if (filp->f_op->open) if (!filp->f_op) goto out_cdev_put; if (filp->f_op->open) { ret = filp->f_op->open(inode,filp); if (ret) goto out_cdev_put; } return 0; out_cdev_put: cdev_put(p); return ret; } Loading