소스 검색

[PATCH] bonding: Remove unneeded NULL test

Remove unneeded test for NULL.  Reported by Thomas Dillig
<tdillig@stanford.edu> and Isil Dillig <isil@stanford.edu> via Stephen
Hemminger <shemminger@osdl.org>.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jay Vosburgh 18 년 전
부모
커밋
a50d8de2cc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/net/bonding/bond_sysfs.c

+ 1 - 1
drivers/net/bonding/bond_sysfs.c

@@ -1093,7 +1093,7 @@ static ssize_t bonding_store_active_slave(struct class_device *cd, const char *b
 			     strlen(slave->dev->name)) == 0) {
         			old_active = bond->curr_active_slave;
         			new_active = slave;
-        			if (new_active && (new_active == old_active)) {
+        			if (new_active == old_active) {
 					/* do nothing */
 					printk(KERN_INFO DRV_NAME
 				       	       ": %s: %s is already the current active slave.\n",