]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Use memdup_user() rather than duplicating its implementation
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 23 Sep 2016 15:26:02 +0000 (17:26 +0200)
committerSinclair Yeh <syeh@vmware.com>
Mon, 10 Oct 2016 18:46:53 +0000 (11:46 -0700)
commit9fe34b7492f726a2215b9bf9c8904c1ec64de7bd
tree702914fca2f7ea8d5dc80c7f33042a807fc64283
parentc2f5ec1e2a4f032fa98debccfcb579806449fd90
drm/vmwgfx: Use memdup_user() rather than duplicating its implementation

* Reuse existing functionality from memdup_user() instead of keeping
  duplicate source code.

* Try this copy operation before allocating memory for the data structure
  member "offsets".

* Delete the local variable "user_sizes" which became unnecessary
  with this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c