[PATCH 01/18] fs/fs.c: check that fsdev->cdev->dev is not NULL

Renaud Barbier renaud.barbier at ge.com
Mon Dec 3 13:08:17 EST 2012


Signed-off-by: Renaud Barbier <renaud.barbier at ge.com>
---
 fs/fs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index dc3a6e3..3065440 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1108,7 +1108,8 @@ static int fs_probe(struct device_d *dev)
 		return ret;
 
 	if (fsdev->cdev) {
-		dev_add_child(fsdev->cdev->dev, &fsdev->dev);
+		if (fsdev->cdev->dev)
+			dev_add_child(fsdev->cdev->dev, &fsdev->dev);
 		fsdev->parent_device = fsdev->cdev->dev;
 	}
 
-- 
1.7.1




More information about the barebox mailing list