Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543AbbHSA6z (ORCPT ); Tue, 18 Aug 2015 20:58:55 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:33842 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbbHSA6y (ORCPT ); Tue, 18 Aug 2015 20:58:54 -0400 Date: Tue, 18 Aug 2015 17:58:51 -0700 From: Brian Norris To: Colin King Cc: David Woodhouse , Aaron Sierra , Ard Biesheuvel , Fabian Frederick , Joe Schultz , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: fix null pointer deference when kzalloc returns null Message-ID: <20150819005851.GU60523@google.com> References: <1437129472-13099-1-git-send-email-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437129472-13099-1-git-send-email-colin.king@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 708 Lines: 19 On Fri, Jul 17, 2015 at 11:37:52AM +0100, Colin King wrote: > From: Colin Ian King > > static analysis by smatch caught the following error: > > drivers/mtd/maps/physmap_of.c:135 of_get_probes() > error: potential null dereference 'res'. (kzalloc returns null) > > Check for failed kzalloc and return -ENOMEM in of_flash_probe if > this occurs. > > Signed-off-by: Colin Ian King Pushed to l2-mtd.git -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/