• Leon Romanovsky's avatar
    IB/mthca: Check validity of output parameter pointer · a43402af
    Leon Romanovsky authored
    The mthca driver didn't check supplied pointer to functions
    mthca_cmd_poll() and mthca_cmd_wait(). This caused to the following
    smatch errors:
    
    drivers/infiniband/hw/mthca/mthca_cmd.c:371 mthca_cmd_poll() error: we previously assumed 'out_param' could be null (see line 353)
    drivers/infiniband/hw/mthca/mthca_cmd.c:454 mthca_cmd_wait() error: we previously assumed 'out_param' could be null (see line 432)
    
    In reality all callers of these functions are setting out_is_imm
    flag are providing pointer too. However it is better to check
    again to remove smatch errors to achieve warning free subsystem.
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    a43402af
mthca_cmd.c 57.4 KB