From 5d595defc14e8980570e6e2e504ade3d5c87853e Mon Sep 17 00:00:00 2001 From: "Sanford Rockowitz (/shared/home/rock/dot_gitconfig)" Date: Sun, 10 Mar 2024 18:38:28 -0400 Subject: [PATCH] dbgrpt_sysfs_i2c_info(): don't test for drm support if adapter_path == NULL --- src/i2c/i2c_sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i2c/i2c_sysfs.c b/src/i2c/i2c_sysfs.c index 759be1dde..9ae1573fe 100644 --- a/src/i2c/i2c_sysfs.c +++ b/src/i2c/i2c_sysfs.c @@ -1516,8 +1516,10 @@ void dbgrpt_sysfs_i2c_info(Sysfs_I2C_Info * info, int depth) { rpt_vstring(d1, "conflicting_driver_names: %s", join_string_g_ptr_array_t(info->conflicting_driver_names, ", ") ); #ifdef USE_LIBDRM - rpt_vstring(d1, "adapter supports DRM: %s", - sbool(adapter_supports_drm_using_drm_api(info->adapter_path))); + if (info->adapter_path) { + rpt_vstring(d1, "adapter supports DRM: %s", + sbool(adapter_supports_drm_using_drm_api(info->adapter_path))); + } #endif }