]> www.infradead.org Git - users/jedix/linux-maple.git/commit
intel: i40e: fix confused code
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Sat, 17 Oct 2015 20:58:19 +0000 (22:58 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:33:16 +0000 (08:33 -0800)
commit327b3cedbcba2ee0bd9dc6b31316f3d201a69829
treea21a12b56908afe9e249a07ec522ad86a19169af
parentb5148625c098773326c410737300daef5774f7ec
intel: i40e: fix confused code

Orabug: 22342532

This code is pretty confused. The variable name 'bytes_not_copied'
clearly indicates that the programmer knew the semantics of
copy_{to,from}_user, but then the return value is checked for being
negative and used as a -Exxx return value.

I'm not sure this is the proper fix, but at least we get rid of the
dead code which pretended to check for access faults.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 0286c67e710cc82260b8c826e5a7b75143fedbd6)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_debugfs.c