Skip to content

Commit

Permalink
virtio_net: minor cleanup
Browse files Browse the repository at this point in the history
	goto done;
done:
	return;
is ugly, it was put there to make diff review easier.
replace by open-coded return.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Michael S. Tsirkin authored and Rusty Russell committed Oct 14, 2014
1 parent 080c637 commit 507613b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ static void virtnet_config_changed_work(struct work_struct *work)

if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS,
struct virtio_net_config, status, &v) < 0)
goto done;
return;

if (v & VIRTIO_NET_S_ANNOUNCE) {
netdev_notify_peers(vi->dev);
Expand All @@ -1414,7 +1414,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
v &= VIRTIO_NET_S_LINK_UP;

if (vi->status == v)
goto done;
return;

vi->status = v;

Expand All @@ -1425,8 +1425,6 @@ static void virtnet_config_changed_work(struct work_struct *work)
netif_carrier_off(vi->dev);
netif_tx_stop_all_queues(vi->dev);
}
done:
return;
}

static void virtnet_config_changed(struct virtio_device *vdev)
Expand Down

0 comments on commit 507613b

Please sign in to comment.