From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754862AbdEHTBk (ORCPT ); Mon, 8 May 2017 15:01:40 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:35092 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbdEHTBi (ORCPT ); Mon, 8 May 2017 15:01:38 -0400 Date: Mon, 08 May 2017 15:01:36 -0400 (EDT) Message-Id: <20170508.150136.1033006170371331565.davem@davemloft.net> To: christophe.jaillet@wanadoo.fr Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] net: dsa: loop: Check for memory allocation failure From: David Miller In-Reply-To: <20170506052945.2639-1-christophe.jaillet@wanadoo.fr> References: <20170506052945.2639-1-christophe.jaillet@wanadoo.fr> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 08 May 2017 11:20:09 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET Date: Sat, 6 May 2017 07:29:45 +0200 > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > Return -ENOMEM instead, as done for some other memory allocation just a > few lines above. > > Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") > > Signed-off-by: Christophe JAILLET Please do not separate "Fixes: " tags from signoffs and acks with empty lines in the future, thank you. Applied and queued up for -stable.