• Alex Elder's avatar
    net: ipa: skip SKB copy if no netdev · 1b65bbcc
    Alex Elder authored
    In ipa_endpoint_skb_copy(), a new socket buffer structure is
    allocated so that some data can be copied into it.  However, after
    doing this, if the endpoint has a null netdev pointer, we just drop
    free the socket buffer.
    
    Instead, check endpoint->netdev pointer first, and just return early
    if it's null.  Also return early if the SKB allocation fails, to
    avoid the deeper indentation in the normal path.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    1b65bbcc
ipa_endpoint.c 52.8 KB