diff --git a/drivers/amlogic/media/gdc/app/gdc_module.c b/drivers/amlogic/media/gdc/app/gdc_module.c index 211bb835b3b2..71ec73e627c6 100644 --- a/drivers/amlogic/media/gdc/app/gdc_module.c +++ b/drivers/amlogic/media/gdc/app/gdc_module.c @@ -1800,7 +1800,7 @@ static ssize_t config_out_path_show(struct device *dev, static ssize_t config_out_path_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { - if (strlen(buf) >= sizeof(config_out_file)) { + if (strlen(buf) >= CONFIG_PATH_LENG) { pr_info("err: path too long\n"); } else { strncpy(config_out_file, buf, CONFIG_PATH_LENG - 1);