]> git.proxmox.com Git - mirror_qemu.git/commit
net/rocker: Remove the dead error handling
authorMao Zhongyi <maozy.fnst@cn.fujitsu.com>
Mon, 14 Aug 2017 03:33:07 +0000 (11:33 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 8 Sep 2017 00:17:37 +0000 (08:17 +0800)
commit107e4b352cc309f9bd7588ef1a44549200620078
tree50a7dc360ddd299a00f4a694bd56b9c27792e81e
parent6ce310b5356abb7edc3aa8b8b097d0b8cc76f83f
net/rocker: Remove the dead error handling

Memory allocation functions like world_alloc, desc_ring_alloc etc,
they are all wrappers around g_malloc, g_new etc. But g_malloc and
similar functions doesn't return null. Because they ignore the fact
that g_malloc() of 0 bytes returns null. So error checks for these
allocation failure are superfluous. Now, remove them entirely.

Cc: jasowang@redhat.com
Cc: jiri@resnulli.us
Cc: armbru@redhat.com
Cc: f4bug@amsat.org
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/rocker/rocker.c
hw/net/rocker/rocker_desc.c
hw/net/rocker/rocker_fp.c
hw/net/rocker/rocker_of_dpa.c
hw/net/rocker/rocker_world.c