소스 검색

asus-laptop: Fix potential invalid pointer dereference

The 0-day build testing backend noticed that a string could be dereferenced
without validation. Fix that.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Matthew Garrett 13 년 전
부모
커밋
9f89748463
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/platform/x86/asus-laptop.c

+ 1 - 1
drivers/platform/x86/asus-laptop.c

@@ -1743,7 +1743,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus)
 		return -ENOMEM;
 	}
 
-	if (*string)
+	if (string)
 		pr_notice("  %s model detected\n", string);
 
 	if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL))