Commit 0f4b20e
slimbus: qcom-ngd: Fix kfree() of static memory on setting driver_override
The driver_override field from platform driver should not be initialized
from static memory (string literal) because the core later kfree() it,
for example when driver_override is set via sysfs.
Use dedicated helper to set driver_override properly.
Fixes: 917809e ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220419113435.246203-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent fb4ac6f commit 0f4b20e
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
| 1437 | + | |
1437 | 1438 | | |
1438 | 1439 | | |
1439 | 1440 | | |
| |||
1455 | 1456 | | |
1456 | 1457 | | |
1457 | 1458 | | |
1458 | | - | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
1459 | 1470 | | |
1460 | 1471 | | |
1461 | 1472 | | |
| |||
0 commit comments