diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 6404f128f..b776d05f5 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -147,7 +147,7 @@ static int scst_write_trace(const char *buf, size_t length, unsigned long *log_level, unsigned long default_level, const char *name, const struct scst_trace_log *tbl) { - int res = length; + int res; int action; unsigned long level = 0, oldlevel; char *buffer, *p, *e; @@ -286,6 +286,8 @@ static int scst_write_trace(const char *buf, size_t length, PRINT_INFO("Changed trace level for \"%s\": old 0x%08lx, new 0x%08lx", name, oldlevel, *log_level); + res = length; + out_free: kfree(buffer); out: