diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 082a6e980d017835c695f5240c40a07dcdba37ba..02d1cdd7f798c9d4c75eb9bfcff3ebeacfa72480 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -2,6 +2,7 @@
 #ifndef __DRM_OF_H__
 #define __DRM_OF_H__
 
+#include <linux/err.h>
 #include <linux/of_graph.h>
 #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
 #include <drm/drm_bridge.h>