소스 검색

staging: unisys: remove unnecessary complication from delete_vbus_device

Take out the variable used to compute a comparison against NULL, and
just use the parameter directly.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer 10 년 전
부모
커밋
c394650650
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      drivers/staging/unisys/virtpci/virtpci.c

+ 1 - 2
drivers/staging/unisys/virtpci/virtpci.c

@@ -400,10 +400,9 @@ delete_vbus(struct del_vbus_guestpart *delparams)
 static int
 delete_vbus_device(struct device *vbus, void *data)
 {
-	int checkforroot = (data != NULL);
 	struct device *dev = &virtpci_rootbus_device;
 
-	if ((checkforroot) && match_busid(vbus, (void *)BUS_ID(dev))) {
+	if ((data) && match_busid(vbus, (void *)BUS_ID(dev))) {
 		/* skip it - don't delete root bus */
 		return 0;	/* pretend no error */
 	}