diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c index 2984d10..57cb0c3 100644 --- a/arch/arm/boards/karo-tx28/tx28-stk5.c +++ b/arch/arm/boards/karo-tx28/tx28-stk5.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -344,8 +345,11 @@ } /* use the full partition as our persistent environment storage */ - return devfs_add_partition("disk0.1", 0, cdev->size, + cdev = devfs_add_partition("disk0.1", 0, cdev->size, DEVFS_PARTITION_FIXED, "env0"); + if (IS_ERR(cdev)) + return PTR_ERR(cdev); + return 0; } void tx28_get_ethaddr(void)