syzbot is reporting NULL pointer dereference at mtd_check_of_node() [1], for mtdram test device (CONFIG_MTD_MTDRAM) is not partition.
Unified · Split
| @@ -559,6 +559,8 @@ static void mtd_check_of_node(struct mtd_info *mtd) · 558 unmodified lines | ||
| 559 | 559 | return; |
| 560 | 560 | |
| 561 | 561 | /* Check if a partitions node exist */ |
| 562 | + if (!mtd_is_partition(mtd)) | |
| 563 | + return; | |
| 562 | 564 | parent = mtd->parent; |
| 563 | 565 | parent_dn = dev_of_node(&parent->dev); |
| 564 | 566 | if (!parent_dn) |