[PATCH 01/10] x-functions do not return in case of failure.
Juergen Beisert
jbe at pengutronix.de
Fri Oct 8 12:30:49 EDT 2010
Remove error handling, because in case of failure the xzalloc() function
does not return.
Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
---
drivers/ata/disk_drive.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 250dada..6d5c87a 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -281,10 +281,6 @@ static int disk_probe(struct device_d *dev)
/* It seems a valuable disk. Register it */
disk_cdev = xzalloc(sizeof(struct cdev));
- if (disk_cdev == NULL) {
- dev_err(dev, "Out of memory\n");
- return -ENOMEM;
- }
/*
* BIOS based disks needs special handling. Not the driver can
--
1.7.2.3
More information about the barebox
mailing list