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-05-23 16:29:24 -04:00
2011-04-17 00:48:31 -07:00
2011-03-17 11:59:32 +11:00
2011-07-21 13:47:54 -07:00
2011-03-21 18:16:39 -07:00
2011-06-16 23:19:27 -04:00
2011-07-01 16:11:16 -07:00
2011-06-16 23:19:27 -04:00
2011-07-01 16:11:16 -07:00
2011-07-05 15:26:58 -04:00
2011-07-01 16:16:19 -07:00
2011-05-24 01:13:12 -04:00
2011-03-31 11:26:23 -03:00
2011-07-01 16:11:16 -07:00
2011-05-05 11:10:14 -07:00
2011-07-05 15:26:57 -04:00
2011-07-05 15:26:57 -04:00