diff options
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index ec0e3ae8c09d..5bd3f9461e2d 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -403,15 +403,21 @@ static int drm_version(struct drm_device *dev, void *data, | |||
403 | struct drm_file *file_priv) | 403 | struct drm_file *file_priv) |
404 | { | 404 | { |
405 | struct drm_version *version = data; | 405 | struct drm_version *version = data; |
406 | int err; | ||
406 | 407 | ||
407 | version->version_major = dev->driver->major; | 408 | version->version_major = dev->driver->major; |
408 | version->version_minor = dev->driver->minor; | 409 | version->version_minor = dev->driver->minor; |
409 | version->version_patchlevel = dev->driver->patchlevel; | 410 | version->version_patchlevel = dev->driver->patchlevel; |
410 | drm_copy_field(version->name, &version->name_len, dev->driver->name); | 411 | err = drm_copy_field(version->name, &version->name_len, |
411 | drm_copy_field(version->date, &version->date_len, dev->driver->date); | 412 | dev->driver->name); |
412 | drm_copy_field(version->desc, &version->desc_len, dev->driver->desc); | 413 | if (!err) |
413 | 414 | err = drm_copy_field(version->date, &version->date_len, | |
414 | return 0; | 415 | dev->driver->date); |
416 | if (!err) | ||
417 | err = drm_copy_field(version->desc, &version->desc_len, | ||
418 | dev->driver->desc); | ||
419 | |||
420 | return err; | ||
415 | } | 421 | } |
416 | 422 | ||
417 | /** | 423 | /** |