Skip to content

Commit

Permalink
x86/intel_rdt: Remove redundant ternary operator on return
Browse files Browse the repository at this point in the history
The use of the ternary operator is redundant as ret can never be
non-zero at that point. Instead, just return nbytes.

Detected by CoverityScan, CID#1452658 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Vikas Shivappa <vikas.shivappa@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/20170808092859.13021-1-colin.king@canonical.com
  • Loading branch information
Colin Ian King authored and Thomas Gleixner committed Aug 16, 2017
1 parent 24247ae commit 5707b46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of,

intel_cqm_threshold = bytes / r->mon_scale;

return ret ?: nbytes;
return nbytes;
}

/* rdtgroup information files for one cache resource. */
Expand Down

0 comments on commit 5707b46

Please sign in to comment.