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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux