mlx5/core: Use memdup_user() rather than duplicating its implementation
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 20 Aug 2016 05:50:09 +0000 (07:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Aug 2016 00:05:38 +0000 (17:05 -0700)
commit6f0b826da4a33e83501d6c1dc977afa0f5f7166f
treeaf27337c277eac3b89b403b4d9548946fef37a24
parentb9a24bb76bf611a5268ceffe04219e6ad264559b
mlx5/core: 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.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c