From: Ben Hutchings Date: Thu, 21 Jul 2011 22:25:30 +0000 (-0700) Subject: ethtool: Allow zero-length register dumps again X-Git-Tag: v3.1-rc1~316^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67ae7cf1eeda777f79259c4c6cb17a0bd28dee71;p=pandora-kernel.git ethtool: Allow zero-length register dumps again Some drivers (ab)use the ethtool_ops::get_regs operation to expose only a hardware revision ID. Commit a77f5db361ed9953b5b749353ea2c7fed2bf8d93 ('ethtool: Allocate register dump buffer with vmalloc()') had the side-effect of breaking these, as vmalloc() returns a null pointer for size=0 whereas kmalloc() did not. For backward-compatibility, allow zero-length dumps again. Reported-by: Kalle Valo Signed-off-by: Ben Hutchings Cc: stable@kernel.org [2.6.37+] Signed-off-by: David S. Miller --- Reading git-diff-tree failed