Commit 09472ce
i2c: tiny-usb: drop redundant device reference
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>1 parent 32dbfb4 commit 09472ce
1 file changed
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 216 | | |
223 | 217 | | |
224 | 218 | | |
| |||
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
240 | | - | |
| 234 | + | |
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
| |||
277 | 271 | | |
278 | 272 | | |
279 | 273 | | |
280 | | - | |
281 | | - | |
| 274 | + | |
282 | 275 | | |
283 | 276 | | |
284 | 277 | | |
| |||
289 | 282 | | |
290 | 283 | | |
291 | 284 | | |
292 | | - | |
| 285 | + | |
293 | 286 | | |
294 | 287 | | |
295 | 288 | | |
| |||
0 commit comments