From 1d117c4888d3fc9cc23e0d1e42e69463ea0c083d Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 20 Dec 2016 10:33:32 +0100 Subject: [PATCH] fs: squashfs: don't reference UBI symbols if UBI isn't compiled in There is no point in trying to append a UBI root option, if there is no UBI support in barebox. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- fs/squashfs/squashfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/squashfs/squashfs.c b/fs/squashfs/squashfs.c index c4d0bac97..4f4a307da 100644 --- a/fs/squashfs/squashfs.c +++ b/fs/squashfs/squashfs.c @@ -120,6 +120,9 @@ void squashfs_set_rootarg(struct squashfs_priv *priv, struct fs_device_d *fsdev) struct mtd_info *mtd; char *str; + if (!IS_ENABLED(CONFIG_MTD_UBI)) + return; + ubi_vol = ubi_open_volume_cdev(fsdev->cdev, UBI_READONLY); if (IS_ERR(ubi_vol))