From 8988417b046ba4db6675c11f0c70d0221e1c1a56 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 15 Feb 2024 09:48:03 +0000 Subject: [PATCH] return non-zero if drm_fb_helper_alloc_info() fails in rkdrm_fb_probe() found by smatch --- sys/dev/fdt/rkdrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/rkdrm.c b/sys/dev/fdt/rkdrm.c index e4445706583..16f4374cad7 100644 --- a/sys/dev/fdt/rkdrm.c +++ b/sys/dev/fdt/rkdrm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkdrm.c,v 1.20 2024/01/19 17:51:15 kettenis Exp $ */ +/* $OpenBSD: rkdrm.c,v 1.21 2024/02/15 09:48:03 jsg Exp $ */ /* $NetBSD: rk_drm.c,v 1.3 2019/12/15 01:00:58 mrg Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -528,7 +528,7 @@ rkdrm_fb_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size * info = drm_fb_helper_alloc_info(helper); if (IS_ERR(info)) { DRM_ERROR("Failed to allocate fb_info\n"); - return error; + return PTR_ERR(info); } info->par = helper; return 0; -- 2.20.1