mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/7] x-functions do not return in case of failure.
Date: Thu,  7 Oct 2010 15:24:12 +0200	[thread overview]
Message-ID: <1286457858-29771-2-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1286457858-29771-1-git-send-email-jbe@pengutronix.de>

Remove error handling, because in case of failure the xzalloc() function
does not return.

Signed-off-by: Juergen Beisert <jbe@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-10-07 13:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 13:24 [RFC] Add MCI card support to barebox Juergen Beisert
2010-10-07 13:24 ` Juergen Beisert [this message]
2010-10-07 13:24 ` [PATCH 2/7] Make the disk driver less noisy Juergen Beisert
2010-10-07 13:24 ` [PATCH 3/7] Don't use a sector buffer on stack Juergen Beisert
2010-10-07 13:24 ` [PATCH 4/7] Don't try to guess the size of a disk if its size value is already given Juergen Beisert
2010-10-07 13:24 ` [PATCH 5/7] Add MCI card support to barebox Juergen Beisert
2010-10-07 15:37   ` Sascha Hauer
2010-10-07 16:00     ` Juergen Beisert
2010-10-07 16:59       ` Sascha Hauer
2010-10-07 17:39         ` Juergen Beisert
2010-10-07 13:24 ` [PATCH 6/7] Add i.MX23 MCI card support Juergen Beisert
2010-10-07 13:24 ` [PATCH 7/7] Add S3C2440 " Juergen Beisert
2010-10-07 17:10   ` Sascha Hauer
2010-10-07 17:51     ` Juergen Beisert
2010-10-07 15:16 ` [RFC] Add MCI card support to barebox Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286457858-29771-2-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox