summaryrefslogtreecommitdiffstats
path: root/fs
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 /fs
parent347ab857903a8e613052a28540abdcf78edb2f1b (diff)
downloadbarebox-25e67cbb2fce8690bcde07598ad4998aad475f13.tar.gz
barebox-25e67cbb2fce8690bcde07598ad4998aad475f13.tar.xz
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 'fs')
-rw-r--r--fs/omap4_usbbootfs.c2
-rw-r--r--fs/pstore/fs.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c
index 6085bca841..b35f411cbb 100644
--- a/fs/omap4_usbbootfs.c
+++ b/fs/omap4_usbbootfs.c
@@ -73,8 +73,6 @@ static struct file_priv *omap4_usbbootfs_do_open(
return ERR_PTR(-ENOSYS);
priv = xzalloc(sizeof(*priv));
- if (!priv)
- return ERR_PTR(-ENOMEM);
data = OMAP4_USBBOOT_FS_MAGIC ; omap4_usbboot_write(&data, 4);
data = OMAP4_USBBOOT_FS_CMD_OPEN; omap4_usbboot_write(&data, 4);
diff --git a/fs/pstore/fs.c b/fs/pstore/fs.c
index 0e05d48ea0..a879a68064 100644
--- a/fs/pstore/fs.c
+++ b/fs/pstore/fs.c
@@ -64,8 +64,6 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
}
private = xzalloc(sizeof(*private) + size);
- if (!private)
- return -ENOMEM;
private->type = type;
private->id = id;
private->count = count;