Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/bnxt_re: Remove some dead code

If the probe succeeds, then auxiliary_get_drvdata() can't return a NULL
pointer.

So several NULL checks can be removed to simplify code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/f02eb630734ee530315dce9f60b078f631ae93d0.1730477345.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Christophe JAILLET and committed by
Leon Romanovsky
aceee63a cf90a4d1

-19
-19
drivers/infiniband/hw/bnxt_re/main.c
··· 300 300 struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev); 301 301 struct bnxt_re_dev *rdev; 302 302 303 - if (!en_info) 304 - return; 305 - 306 303 rdev = en_info->rdev; 307 304 ib_unregister_device(&rdev->ibdev); 308 305 bnxt_re_dev_uninit(rdev, BNXT_RE_COMPLETE_REMOVE); ··· 312 315 struct bnxt_re_dev *rdev; 313 316 struct bnxt_qplib_nq *nq; 314 317 int indx; 315 - 316 - if (!en_info) 317 - return; 318 318 319 319 rdev = en_info->rdev; 320 320 rcfw = &rdev->rcfw; ··· 332 338 struct bnxt_re_dev *rdev; 333 339 struct bnxt_qplib_nq *nq; 334 340 int indx, rc; 335 - 336 - if (!en_info) 337 - return; 338 341 339 342 rdev = en_info->rdev; 340 343 msix_ent = rdev->en_dev->msix_entries; ··· 1982 1991 struct bnxt_re_dev *rdev; 1983 1992 1984 1993 mutex_lock(&bnxt_re_mutex); 1985 - if (!en_info) { 1986 - mutex_unlock(&bnxt_re_mutex); 1987 - return; 1988 - } 1989 1994 rdev = en_info->rdev; 1990 1995 1991 1996 if (rdev) ··· 2030 2043 struct bnxt_en_dev *en_dev; 2031 2044 struct bnxt_re_dev *rdev; 2032 2045 2033 - if (!en_info) 2034 - return 0; 2035 - 2036 2046 rdev = en_info->rdev; 2037 2047 en_dev = en_info->en_dev; 2038 2048 mutex_lock(&bnxt_re_mutex); ··· 2073 2089 { 2074 2090 struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev); 2075 2091 struct bnxt_re_dev *rdev; 2076 - 2077 - if (!en_info) 2078 - return 0; 2079 2092 2080 2093 mutex_lock(&bnxt_re_mutex); 2081 2094 /* L2 driver may invoke this callback during device recovery, resume.