tty/hvc_opal: simplify if-if to if-else

Use if and else instead of if(A) and if (!A).

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20220426071041.168282-1-wanjiabing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Wan Jiabing 2022-04-26 15:10:41 +08:00 committed by Greg Kroah-Hartman
parent 8043b16f52
commit f0426b4e3b

View File

@ -342,9 +342,9 @@ void __init hvc_opal_init_early(void)
* path, so we hard wire it
*/
opal = of_find_node_by_path("/ibm,opal/consoles");
if (opal)
if (opal) {
pr_devel("hvc_opal: Found consoles in new location\n");
if (!opal) {
} else {
opal = of_find_node_by_path("/ibm,opal");
if (opal)
pr_devel("hvc_opal: "