]> git.baikalelectronics.ru Git - kernel.git/commit
enic: check return value for stat dump
authorGovindarajulu Varadarajan <_govind@gmx.com>
Thu, 11 Jun 2015 06:22:55 +0000 (11:52 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2015 06:42:39 +0000 (23:42 -0700)
commitc59bd5fc7ee1416a49f76dcdf36e5a2147bf6fb5
tree5484ba980423c60c8f684cc681d9c76883fe11ff
parent4200c4b7d0d2a69341ba1a3fdc71d12a0b7474d7
enic: check return value for stat dump

We do not check the return value of enic_dev_stats_dump(). If allocation
fails, we will hit NULL pointer reference.

Return only if memory allocation fails. For other failures, we return the
previously recorded values.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/enic_ethtool.c
drivers/net/ethernet/cisco/enic/enic_main.c