diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c index fe996d0cb71c4bf513e310a7d226e1f4ef34d424..edaae93af8f90a7b80bf71717d6b45ff0cac4b0e 100644 --- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c @@ -704,7 +704,7 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, if (ret == 0) { memcpy(out, ev->var.Data, ev->var.DataSize); *out_len = ev->var.DataSize; - } else { + } else if (dev) { dev_warn(dev, "Failed to find gmin variable %s\n", var8); }