openocd: fix simple cases of NULL comparison
[fw/openocd] / src / jtag / hla / hla_interface.c
index 15651763da8eb9bdb36a3021a383180acc3e4a7b..0aaf22f98ef096845a2d2f86e5fd1bbf6ae522a8 100644 (file)
@@ -165,7 +165,7 @@ static int hl_interface_speed(int speed)
        if (hl_if.layout->api->speed == NULL)
                return ERROR_OK;
 
-       if (hl_if.handle == NULL) {
+       if (!hl_if.handle) {
                /* pass speed as initial param as interface not open yet */
                hl_if.param.initial_interface_speed = speed;
                return ERROR_OK;