[media] dvb_frontend: Use memdup_user() rather than duplicating its implementation
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 19 Aug 2016 08:04:54 +0000 (05:04 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 24 Aug 2016 20:20:45 +0000 (17:20 -0300)
commitfb6609280db902bd5d34445fba1c926e95e63914
tree13286596c1bbea4a203f63dd2a69a09794b8cd6a
parent8eb14e8084b0f39dbf23dcd0c263fc2fac862048
[media] dvb_frontend: Use memdup_user() rather than duplicating its implementation

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

  This issue was detected by using the Coccinelle software.

* Return directly if this copy operation failed.

* Replace the specification of data structures by pointer dereferences
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvb_frontend.c