Commit 1c5e3d9
committed
of: Add a helper to free property struct
Freeing a property struct is 3 kfree()'s which is duplicated in multiple
spots. Add a helper, __of_prop_free(), and replace all the open coded
cases in the DT code.
Reviewed-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240409-dt-cleanup-free-v2-1-5b419a4af38d@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>1 parent 15f3df3 commit 1c5e3d9
4 files changed
Lines changed: 19 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
308 | 315 | | |
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| |||
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
429 | | - | |
430 | | - | |
431 | | - | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
473 | | - | |
474 | | - | |
475 | | - | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
921 | 922 | | |
922 | 923 | | |
923 | 924 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
| 925 | + | |
| 926 | + | |
929 | 927 | | |
930 | 928 | | |
931 | 929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 265 | + | |
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
| |||
361 | 359 | | |
362 | 360 | | |
363 | 361 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 362 | + | |
| 363 | + | |
369 | 364 | | |
370 | 365 | | |
371 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
799 | | - | |
800 | | - | |
| 798 | + | |
801 | 799 | | |
802 | 800 | | |
803 | 801 | | |
804 | | - | |
805 | | - | |
806 | | - | |
| 802 | + | |
807 | 803 | | |
808 | 804 | | |
809 | 805 | | |
| |||
3718 | 3714 | | |
3719 | 3715 | | |
3720 | 3716 | | |
3721 | | - | |
3722 | | - | |
3723 | | - | |
| 3717 | + | |
3724 | 3718 | | |
3725 | 3719 | | |
3726 | 3720 | | |
| |||
0 commit comments