Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

alpha: remove redundant err variable

Return value from __hw_perf_event_init() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>

authored by

Minghao Chi and committed by
Matt Turner
d7cf43ed 019f48dc

+1 -5
+1 -5
arch/alpha/kernel/perf_event.c
··· 689 689 */ 690 690 static int alpha_pmu_event_init(struct perf_event *event) 691 691 { 692 - int err; 693 - 694 692 /* does not support taken branch sampling */ 695 693 if (has_branch_stack(event)) 696 694 return -EOPNOTSUPP; ··· 707 709 return -ENODEV; 708 710 709 711 /* Do the real initialisation work. */ 710 - err = __hw_perf_event_init(event); 711 - 712 - return err; 712 + return __hw_perf_event_init(event); 713 713 } 714 714 715 715 /*