summaryrefslogtreecommitdiffstats
path: root/common/state/backend_format_raw.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2017-09-25 12:02:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-26 08:51:30 +0200
commit25e67cbb2fce8690bcde07598ad4998aad475f13 (patch)
tree54022a807486509d258475d8cbe702cdb1dfd78e /common/state/backend_format_raw.c
parent347ab857903a8e613052a28540abdcf78edb2f1b (diff)
downloadbarebox-25e67cbb2fce8690bcde07598ad4998aad475f13.tar.gz
remove checks for xzalloc() returning NULL
xzalloc() either returns memory or panics, so checking for NULL is useless. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_format_raw.c')
-rw-r--r--common/state/backend_format_raw.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
index 2ba97e0..4369f76 100644
--- a/common/state/backend_format_raw.c
+++ b/common/state/backend_format_raw.c
@@ -222,8 +222,6 @@ static int backend_format_raw_pack(struct state_backend_format *format,
size_full = size_data + sizeof(*header) + backend_raw->digest_length;
buf = xzalloc(size_full);
- if (!buf)
- return -ENOMEM;
header = buf;
data = buf + sizeof(*header);
@@ -308,8 +306,6 @@ int backend_format_raw_create(struct state_backend_format **format,
int ret;
raw = xzalloc(sizeof(*raw));
- if (!raw)
- return -ENOMEM;
raw->dev = dev;
ret = backend_format_raw_init_digest(raw, node, secret_name);