aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index f2f6429ab04f..99e67517b5c5 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -338,6 +338,9 @@ void drm_minor_release(struct drm_minor *minor)
338 338
339static int drm_dev_set_unique(struct drm_device *dev, const char *name) 339static int drm_dev_set_unique(struct drm_device *dev, const char *name)
340{ 340{
341 if (!name)
342 return -EINVAL;
343
341 kfree(dev->unique); 344 kfree(dev->unique);
342 dev->unique = kstrdup(name, GFP_KERNEL); 345 dev->unique = kstrdup(name, GFP_KERNEL);
343 346