From: jsg Date: Thu, 15 Feb 2024 09:48:03 +0000 (+0000) Subject: return non-zero if drm_fb_helper_alloc_info() fails in rkdrm_fb_probe() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8988417b046ba4db6675c11f0c70d0221e1c1a56;p=openbsd return non-zero if drm_fb_helper_alloc_info() fails in rkdrm_fb_probe() found by smatch --- 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;