diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_sysfs.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 3733e36d135e..b06a53715853 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -183,6 +183,10 @@ int drm_stub_open(struct inode *inode, struct file *filp) | |||
183 | 183 | ||
184 | old_fops = filp->f_op; | 184 | old_fops = filp->f_op; |
185 | filp->f_op = fops_get(&dev->driver->fops); | 185 | filp->f_op = fops_get(&dev->driver->fops); |
186 | if (filp->f_op == NULL) { | ||
187 | filp->f_op = old_fops; | ||
188 | goto out; | ||
189 | } | ||
186 | if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) { | 190 | if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) { |
187 | fops_put(filp->f_op); | 191 | fops_put(filp->f_op); |
188 | filp->f_op = fops_get(old_fops); | 192 | filp->f_op = fops_get(old_fops); |
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 65d72d094c81..5aa6780652aa 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c | |||
@@ -488,7 +488,7 @@ int drm_sysfs_device_add(struct drm_minor *minor) | |||
488 | else | 488 | else |
489 | minor_str = "card%d"; | 489 | minor_str = "card%d"; |
490 | 490 | ||
491 | snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->index); | 491 | dev_set_name(&minor->kdev, minor_str, minor->index); |
492 | 492 | ||
493 | err = device_register(&minor->kdev); | 493 | err = device_register(&minor->kdev); |
494 | if (err) { | 494 | if (err) { |