From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b7JgT-00042p-Le for barebox@lists.infradead.org; Mon, 30 May 2016 09:40:30 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 30 May 2016 11:39:52 +0200 Message-Id: <1464601193-20832-2-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1464601193-20832-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1464601193-20832-1-git-send-email-u.kleine-koenig@pengutronix.de> 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/3] eeprom: at24: check return value of devfs_create and fix error path To: barebox@lists.infradead.org aWYgZGV2ZnNfY3JlYXRlIGZhaWxlZCBiZWNhdXNlICJlZXByb20wIiBhbHJlYWR5IGV4aXN0cwpv Zl9wYXJzZV9wYXJ0aXRpb25zIG11c3Qgbm90IGJlIGNhbGxlZCwgb3RoZXJ3aXNlIHRoZSBhbHJl YWR5IGV4aXN0aW5nCmVlcHJvbSBnZXRzIGFzc2lnbmVkIHBhcnRpdGlvbnMgdGhhdCBkb24ndCBi ZWxvZyB0aGVyZS4KCkFsc28gZnJlZSBkdW1teSBjbGllbnRzIGluIHRoZSBlcnJvciBwYXRoIGFu ZCB0aGUgd3JpdGUgcHJvdGVjdCBncGlvCm9ubHkgaWYgaXQgaXMgYWN0dWFsbHkgdmFsaWQuCgpT aWduZWQtb2ZmLWJ5OiBVd2UgS2xlaW5lLUvDtm5pZyA8dS5rbGVpbmUta29lbmlnQHBlbmd1dHJv bml4LmRlPgotLS0KIGRyaXZlcnMvZWVwcm9tL2F0Mj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