[PATCH 8/9] platform/x86:intel/pmc: Use the Elvis operator

Xi Pardee
2024-06-24T20:32:28Z

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>
---
drivers/platform/x86/intel/pmc/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index e75c56ee54e6..cfdacb04ff8d 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -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)
--
2.34.1