Skip to content

Commit 9e7f1e7

Browse files
xpardee-createij-intel
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 590a87f commit 9e7f1e7

File tree

1 file changed

+1
-1
lines changed
  • drivers/platform/x86/intel/pmc

1 file changed

+1
-1
lines changed

drivers/platform/x86/intel/pmc/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file,
522522

523523
err = pmc_core_send_ltr_ignore(pmcdev, value, 1);
524524

525-
return err == 0 ? count : err;
525+
return err ?: count;
526526
}
527527

528528
static int pmc_core_ltr_ignore_show(struct seq_file *s, void *unused)

0 commit comments

Comments
 (0)