From: Eric Dumazet Date: Sun, 15 Nov 2009 23:30:24 +0000 (+0000) Subject: net: Fix the rollback test in dev_change_name() X-Git-Tag: v2.6.32-rc8~10^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91e9c07bd635353d1a278bdb38dbb56ac371bcb8;p=pandora-kernel.git net: Fix the rollback test in dev_change_name() net: Fix the rollback test in dev_change_name() In dev_change_name() an err variable is used for storing the original call_netdevice_notifiers() errno (negative) and testing for a rollback error later, but the test for non-zero is wrong, because the err might have positive value as well - from dev_alloc_name(). It means the rollback for a netdevice with a number > 0 will never happen. (The err test is reordered btw. to make it more readable.) Signed-off-by: Jarek Poplawski Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed