Browse Source

mkiss: remove redundant check on len being zero

The check on len is redundant as it is always greater than 1,
so just remove it and make the printk less complex.

Detected by CoverityScan, CID#1226729 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Colin Ian King 8 years ago
parent
commit
45c1fd61d5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/net/hamradio/mkiss.c

+ 2 - 1
drivers/net/hamradio/mkiss.c

@@ -477,7 +477,8 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
 				  cmd = 0;
 				  cmd = 0;
 				}
 				}
 				ax->crcauto = (cmd ? 0 : 1);
 				ax->crcauto = (cmd ? 0 : 1);
-				printk(KERN_INFO "mkiss: %s: crc mode %s %d\n", ax->dev->name, (len) ? "set to" : "is", cmd);
+				printk(KERN_INFO "mkiss: %s: crc mode set to %d\n",
+				       ax->dev->name, cmd);
 			}
 			}
 			spin_unlock_bh(&ax->buflock);
 			spin_unlock_bh(&ax->buflock);
 			netif_start_queue(dev);
 			netif_start_queue(dev);