[PATCH 2/2] watchdog: dw_wdt: populate driver_d.name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apparently, somewhere between v2017.01.0 and v2020.01.0, barebox became
dependent on drivers having a name as having this driver enabled in
v2020.01.0 has barebox crash due to a null pointer dereference in the
device_match's second strcmp.

A previous commit introduced a palatable warning for this case.
Now in order to be able to use the driver again, give it a name.

Cc: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/watchdog/dw_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index a029da2b2f4a..cb0d17e3610b 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -189,6 +189,7 @@ static struct of_device_id dw_wdt_of_match[] = {
 };
 
 static struct driver_d dw_wdt_driver = {
+	.name		= "dw-wdt",
 	.probe		= dw_wdt_drv_probe,
 	.of_compatible	= DRV_OF_COMPAT(dw_wdt_of_match),
 };
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux