Commit 30aaed3
media: v4l2-async: Fix error handling on steps after finding a match
[ Upstream commit 7345d6d ]
Once an async connection is found to be matching with an fwnode, a
sub-device may be registered (in case it wasn't already), its bound
operation is called, ancillary links are created, the async connection
is added to the sub-device's list of connections and removed from the
global waiting connection list. Further on, the sub-device's possible own
notifier is searched for possible additional matches.
Fix these specific issues:
- If v4l2_async_match_notify() failed before the sub-notifier handling,
the async connection was unbound and its entry removed from the
sub-device's async connection list. The latter part was also done in
v4l2_async_match_notify().
- The async connection's sd field was only set after creating ancillary
links in v4l2_async_match_notify(). It was however dereferenced in
v4l2_async_unbind_subdev_one(), which was called on error path of
v4l2_async_match_notify() failure.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: "Yew, Chang Ching" <chang.ching.yew@intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 4010e59 commit 30aaed3
1 file changed
+31
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| |||
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
388 | 406 | | |
389 | 407 | | |
390 | 408 | | |
| |||
400 | 418 | | |
401 | 419 | | |
402 | 420 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | 421 | | |
414 | 422 | | |
415 | 423 | | |
| |||
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
444 | 456 | | |
445 | 457 | | |
446 | 458 | | |
| |||
823 | 835 | | |
824 | 836 | | |
825 | 837 | | |
826 | | - | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
827 | 843 | | |
828 | 844 | | |
829 | 845 | | |
| |||
847 | 863 | | |
848 | 864 | | |
849 | 865 | | |
850 | | - | |
851 | | - | |
| 866 | + | |
| 867 | + | |
852 | 868 | | |
| 869 | + | |
853 | 870 | | |
854 | 871 | | |
855 | 872 | | |
| |||
0 commit comments