| 3e411827 | 18-Mar-2025 |
Leonid Arapov <[email protected]> |
fbdev: omapfb: Add 'plane' value check
Function dispc_ovl_setup is not intended to work with the value OMAP_DSS_WB of the enum parameter plane.
The value of this parameter is initialized in dss_ini
fbdev: omapfb: Add 'plane' value check
Function dispc_ovl_setup is not intended to work with the value OMAP_DSS_WB of the enum parameter plane.
The value of this parameter is initialized in dss_init_overlays and in the current state of the code it cannot take this value so it's not a real problem.
For the purposes of defensive coding it wouldn't be superfluous to check the parameter value, because some functions down the call stack process this value correctly and some not.
For example, in dispc_ovl_setup_global_alpha it may lead to buffer overflow.
Add check for this value.
Found by Linux Verification Center (linuxtesting.org) with SVACE static analysis tool.
Signed-off-by: Leonid Arapov <[email protected]> Signed-off-by: Helge Deller <[email protected]>
show more ...
|
| 3a48b38f | 12-Jan-2025 |
Krzysztof Kozlowski <[email protected]> |
fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_args
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() combined with getting the syscon argument
fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_args
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() combined with getting the syscon argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier.
There is also no real benefit in printing errors on missing syscon argument, because this is done just too late: runtime check on static/build-time data. Dtschema and Devicetree bindings offer the static/build-time check for this already.
Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Helge Deller <[email protected]>
show more ...
|
| de124b61 | 08-Jan-2025 |
Joe Hattori <[email protected]> |
fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_
fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_parent() obtains a reference of the returned OF node, call of_node_put() before returning NULL.
This was found by an experimental verifier that I am developing, and no runtime test was able to be performed due to that lack of actual devices.
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Joe Hattori <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Helge Deller <[email protected]>
show more ...
|
| b03c3519 | 17-Jun-2024 |
Kuninori Morimoto <[email protected]> |
fbdev: omapfb: use of_graph_get_remote_port()
We already have of_graph_get_remote_port(), Let's use it.
Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Laurent Pinc
fbdev: omapfb: use of_graph_get_remote_port()
We already have of_graph_get_remote_port(), Let's use it.
Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Helge Deller <[email protected]>
show more ...
|