Commit 7a1c2ab
RDMA/core: Remove NULL check before dev_{put, hold}
The call netdev_{put, hold} of dev_{put, hold} will check NULL,
so there is no need to check before using dev_{put, hold},
remove it to silence the warning:
./drivers/infiniband/core/nldev.c:375:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed.
Reported-by: Abaci Robot <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7047
Signed-off-by: Yang Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>1 parent b557063 commit 7a1c2ab
File tree
4 files changed
+7
-14
lines changed- drivers/infiniband
- core
- hw/vmw_pvrdma
- ulp/ipoib
4 files changed
+7
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
| 374 | + | |
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
| 1024 | + | |
| 1025 | + | |
1028 | 1026 | | |
1029 | 1027 | | |
1030 | 1028 | | |
| |||
1064 | 1062 | | |
1065 | 1063 | | |
1066 | 1064 | | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
| 1065 | + | |
| 1066 | + | |
1071 | 1067 | | |
1072 | 1068 | | |
1073 | 1069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2005 | 2005 | | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | | - | |
2009 | | - | |
| 2008 | + | |
2010 | 2009 | | |
2011 | 2010 | | |
2012 | 2011 | | |
| |||
0 commit comments