Explorar o código

stdio: Correct a build error with driver model

When driver model is used for video but not for the keyboard, a compiler
warnings is produced. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass %!s(int64=9) %!d(string=hai) anos
pai
achega
35a1f0dfa1
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      common/stdio.c

+ 3 - 0
common/stdio.c

@@ -283,6 +283,9 @@ int stdio_add_devices(void)
 #endif
 #ifdef CONFIG_DM_VIDEO
 	struct udevice *vdev;
+# ifndef CONFIG_DM_KEYBOARD
+	int ret;
+# endif
 
 	for (ret = uclass_first_device(UCLASS_VIDEO, &vdev);
 	     vdev;