• David S. Miller's avatar
    [NET]: Fix net/socket.c warnings. · 4387ff75
    David S. Miller authored
    GCC (correctly) says:
    
    net/socket.c: In function ‘sys_sendto’:
    net/socket.c:1510: warning: ‘err’ may be used uninitialized in this function
    net/socket.c: In function ‘sys_recvfrom’:
    net/socket.c:1571: warning: ‘err’ may be used uninitialized in this function
    
    sock_from_file() either returns filp->private_data or it
    sets *err and returns NULL.
    
    Callers return "err" on NULL, but filp->private_data could
    be NULL.
    
    Some minor rearrangements of error handling in sys_sendto
    and sys_recvfrom solves the issue.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4387ff75
socket.c 53.1 KB