summaryrefslogtreecommitdiffstats
path: root/discover/platform-arm64.c
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2018-08-08 00:01:10 +0000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-08-14 11:10:29 +1000
commitcacb745071a1137d39ef092717c22f76c31b4985 (patch)
treee302c676ae2853f867682fb1791870c19bf29044 /discover/platform-arm64.c
parent7e8bc8b93ce67eda63c5a252fb051ca83979dd5b (diff)
downloadtalos-petitboot-cacb745071a1137d39ef092717c22f76c31b4985.tar.gz
talos-petitboot-cacb745071a1137d39ef092717c22f76c31b4985.zip
discover/platforms: Fix param_list talloc failure
Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/platform-arm64.c')
-rw-r--r--discover/platform-arm64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/discover/platform-arm64.c b/discover/platform-arm64.c
index 9cd6641..a70298a 100644
--- a/discover/platform-arm64.c
+++ b/discover/platform-arm64.c
@@ -39,7 +39,7 @@
static const char *efi_vars_guid = "fb78ab4b-bd43-41a0-99a2-4e74bef9169b";
struct platform_arm64 {
- struct param_list params;
+ struct param_list *params;
struct ipmi *ipmi;
};
@@ -103,7 +103,7 @@ static void get_active_consoles(struct config *config)
static int load_config(struct platform *p, struct config *config)
{
- struct param_list *pl = &to_platform_arm64(p)->params;
+ struct param_list *pl = to_platform_arm64(p)->params;
parse_nvram(pl);
config_populate_all(config, pl);
@@ -221,7 +221,7 @@ static void params_update_all(struct param_list *pl,
static int save_config(struct platform *p, struct config *config)
{
- struct param_list *pl = &to_platform_arm64(p)->params;
+ struct param_list *pl = to_platform_arm64(p)->params;
struct config *defaults;
defaults = talloc_zero(NULL, struct config);
@@ -259,7 +259,8 @@ static bool probe(struct platform *p, void *ctx)
}
platform = talloc_zero(ctx, struct platform_arm64);
- param_list_init(&platform->params, common_known_params());
+ platform->params = talloc_zero(platform, struct param_list);
+ param_list_init(platform->params, common_known_params());
p->platform_data = platform;
OpenPOWER on IntegriCloud