platform/x86:intel/pmc: Use the Elvis operator
Replace ternary operator with Elvis operator in pmc_core_ltr_ignore_write() for better readability of the code. Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com> Link: https://lore.kernel.org/r/20240624203218.2428475-9-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
@@ -522,7 +522,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file,
|
||||
|
||||
err = pmc_core_send_ltr_ignore(pmcdev, value, 1);
|
||||
|
||||
return err == 0 ? count : err;
|
||||
return err ?: count;
|
||||
}
|
||||
|
||||
static int pmc_core_ltr_ignore_show(struct seq_file *s, void *unused)
|
||||
|
||||
Reference in New Issue
Block a user