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 | return; | 559 | return; |
| 560 | 560 | ||
| 561 | /* Check if a partitions node exist */ | 561 | /* Check if a partitions node exist */ |
| 562 | if (!mtd_is_partition(mtd)) | ||
| 563 | return; | ||
| 562 | parent = mtd->parent; | 564 | parent = mtd->parent; |
| 563 | parent_dn = dev_of_node(&parent->dev); | 565 | parent_dn = dev_of_node(&parent->dev); |
| 564 | if (!parent_dn) | 566 | if (!parent_dn) |