Commit f45882c
media: camss: fix memory leaks on error handling paths in probe
camss_probe() does not free camss on error handling paths. The patch
introduces an additional error label for this purpose. Besides, it
removes call of v4l2_async_notifier_cleanup() from
camss_of_parse_ports() since its caller, camss_probe(), cleans up all
its resources itself.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Co-developed-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>1 parent 602649e commit f45882c
1 file changed
Lines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
| |||
835 | 834 | | |
836 | 835 | | |
837 | 836 | | |
838 | | - | |
| 837 | + | |
| 838 | + | |
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
844 | | - | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
845 | 847 | | |
846 | 848 | | |
847 | 849 | | |
848 | | - | |
849 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
850 | 854 | | |
851 | 855 | | |
852 | 856 | | |
853 | | - | |
854 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
855 | 861 | | |
856 | 862 | | |
857 | 863 | | |
858 | 864 | | |
859 | | - | |
860 | | - | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
861 | 869 | | |
862 | 870 | | |
863 | 871 | | |
| |||
936 | 944 | | |
937 | 945 | | |
938 | 946 | | |
| 947 | + | |
| 948 | + | |
939 | 949 | | |
940 | 950 | | |
941 | 951 | | |
| |||
0 commit comments