From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from inx.pm.waw.pl ([195.116.170.130]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PUod9-0001C0-KD for barebox@lists.infradead.org; Mon, 20 Dec 2010 22:55:01 +0000 From: Krzysztof Halasa In-Reply-To: (Krzysztof Halasa's message of "Mon, 20 Dec 2010 23:30:03 +0100") Date: Mon, 20 Dec 2010 23:54:49 +0100 Message-ID: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 5] Fix error handling with malloc, memalign etc. Memalign() can't fail now. To: barebox@lists.infradead.org Rml4IGVycm9yIGhhbmRsaW5nIHdpdGggbWFsbG9jLCBtZW1hbGlnbiBldGMuIE1lbWFsaWduKCkg Y2FuJ3QgZmFpbCBub3cuCgpUaGUgaWRlYSBpcyB0byBwYW5pYygpIHdoZW4gdGhlcmUgaXMgbm8g bWVtb3J5IGF2YWlsYWJsZSBmb3Igbm9ybWFsCm9wZXJhdGlvbi4gRXhjZXB0aW9uOiBjb2RlIHdo aWNoIGNhbiBjb25zdW1lIGFyYml0cmFyeSBhbW91bnQgb2YgUkFNCihleGFtcGxlOiBmaWxlcyBh bGxvY2F0ZWQgaW4gcmFtZnMpIG11c3QgcmVwb3J0IGVycm9yIGluc3RlYWQgb2YKcGFuaWMoKS4K ClRoaXMgcGF0Y2ggYWxzbyBmaXhlcyBjb2RlIHdoaWNoIGRpZG4ndCBjaGVjayBmb3IgTlVMTCBm cm9tIG1hbGxvYygpCmV0Yy4KClVzYWdlOiBtYWxsb2MoKSByZXR1cm5zIE5VTEwgd2hlbiBvdXQg b2YgUkFNLgp4bWFsbG9jKCksIG1lbWFsaWduKCkgYWx3YXlzIHJldHVybiBub24tTlVMTC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