staging: unisys: Check return code properly on visor_copy_fragsinfo_from_skb
authorNeil Horman <nhorman@redhat.com>
Tue, 21 Jul 2015 13:55:36 +0000 (09:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:19:17 +0000 (21:19 -0700)
One call site for visor_copy_fragsinfo_from_skb was checking for an rc of
-1, but thhe function doesn't return that, it returns -errno.  Correct it

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c

index 5bb6cf461b25e0a68aa2ea8eb4f206092f1e7d54..1a0efe25f92915dbcadfe70c38a69401e3dabee8 100644 (file)
@@ -912,7 +912,7 @@ visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
                visor_copy_fragsinfo_from_skb(skb, firstfraglen,
                                              MAX_PHYS_INFO,
                                              cmdrsp->net.xmt.frags);
-       if (cmdrsp->net.xmt.num_frags == -1) {
+       if (cmdrsp->net.xmt.num_frags < 0) {
                spin_unlock_irqrestore(&devdata->priv_lock, flags);
                devdata->busy_cnt++;
                dev_err(&netdev->dev,