From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOtM9-0000wx-0o for barebox@lists.infradead.org; Tue, 02 Sep 2014 19:03:05 +0000 Received: by mail-we0-f171.google.com with SMTP id u56so7435751wes.30 for ; Tue, 02 Sep 2014 12:02:41 -0700 (PDT) From: =?UTF-8?q?Rapha=C3=ABl=20Poggi?= Date: Tue, 2 Sep 2014 12:02:41 -0700 Message-Id: <1409684561-19894-1-git-send-email-poggi.raph@gmail.com> 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] mtd: atmel_nand: fix null pointer dereference To: barebox@lists.infradead.org Cc: =?UTF-8?q?Rapha=C3=ABl=20Poggi?= V2UgbmVlZCB0byBhbGxvY2F0ZSBwZGF0YSBmb3IgZGV2aWNlIHRyZWUgYW5kIG5vbiBkZXZpY2Ug dHJlZSBwcm9iZS4KSW4gZGV2aWNlIHRyZWUgcHJvYmUgd2UgdXNlIHBkYXRhIHRvIGZpbGwgc3Ry dWN0dXJlIG1lbWJlciB3aXRoIGR0cyBkYXRhLgpJbiBub24gZGV2aWNlIHRyZWUgcHJvYmUgd2Ug dXNlIHRoZSBwZGF0YSB0byBoYW5kbGUgcGxhdGZvcm1fZGF0YS4KClNpZ25lZC1vZmYtYnk6IFJh cGhhw6tsIFBvZ2dpIDxwb2dnaS5yYXBoQGdtYWlsLmNvbT4KLS0tCiBkcml2ZXJzL210ZC9uYW5k L2F0bWVsX25hbmQuYyB8IDggKysrKy0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA0IGluc2VydGlvbnMo KyksIDQgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0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