25ee7e89d4
The variable dev is checked in: if (dev) This indicates that it can be NULL. If so, a null-pointer dereference will occur: priv = rtllib_priv(dev); However, the value of priv is not used in the remaining part of this function. Thus the else-branch can be removed to fix this posible null-pointer dereference. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tuo Li <islituo@gmail.com> Link: https://lore.kernel.org/r/20210811031135.4110-1-islituo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>