[PATCH] drm/bochs: Add check for drm_simple_display_pipe_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add check for the return value of drm_simple_display_pipe_init() and
return the error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@xxxxxxxxxxx>
---
 drivers/gpu/drm/tiny/bochs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
index c23c9f0cf49c..31ad2bc4ee22 100644
--- a/drivers/gpu/drm/tiny/bochs.c
+++ b/drivers/gpu/drm/tiny/bochs.c
@@ -550,13 +550,15 @@ static int bochs_kms_init(struct bochs_device *bochs)
 	bochs->dev->mode_config.funcs = &bochs_mode_funcs;
 
 	bochs_connector_init(bochs->dev);
-	drm_simple_display_pipe_init(bochs->dev,
+	ret = drm_simple_display_pipe_init(bochs->dev,
 				     &bochs->pipe,
 				     &bochs_pipe_funcs,
 				     bochs_formats,
 				     ARRAY_SIZE(bochs_formats),
 				     NULL,
 				     &bochs->connector);
+	if (ret)
+		return ret;
 
 	drm_mode_config_reset(bochs->dev);
 
-- 
2.25.1





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux