Ben Hutchings 67ae7cf1ee 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 <kvalo@qca.qualcomm.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: stable@kernel.org [2.6.37+]
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-21 15:25:30 -07:00
..
2011-07-14 14:44:32 -07:00
2010-07-12 12:57:55 -07:00
2011-03-31 11:26:23 -03:00
2010-11-28 18:24:14 -08:00
2010-07-12 12:57:55 -07:00
2011-05-22 21:01:22 -04:00