• Xie He's avatar
    net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames · 583d5333
    Xie He authored
    When the fr_rx function drops a received frame (because the protocol type
    is not supported, or because the PVC virtual device that corresponds to
    the DLCI number and the protocol type doesn't exist), the function frees
    the skb and returns.
    
    The code for freeing the skb and returning is repeated several times, this
    patch uses "goto rx_drop" to replace them so that the code looks cleaner.
    
    Cc: Krzysztof Halasa <khc@pm.waw.pl>
    Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
    Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    583d5333
hdlc_fr.c 29.2 KB