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

drivers/virt/fsl_hypervisor: remove unneeded `ret` variable in `fsl_hv_open()`

Fix the following coccicheck warning:

drivers/virt/fsl_hypervisor.c:662:5-8: Unneeded variable: "ret".
Return "0" on line 679.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220426083315.9551-1-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Guo Zhengkui and committed by
Greg Kroah-Hartman
4647769b 1f714291

+1 -2
+1 -2
drivers/virt/fsl_hypervisor.c
··· 659 659 { 660 660 struct doorbell_queue *dbq; 661 661 unsigned long flags; 662 - int ret = 0; 663 662 664 663 dbq = kzalloc(sizeof(struct doorbell_queue), GFP_KERNEL); 665 664 if (!dbq) { ··· 675 676 676 677 filp->private_data = dbq; 677 678 678 - return ret; 679 + return 0; 679 680 } 680 681 681 682 /*