From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753102AbdEGXWt (ORCPT ); Sun, 7 May 2017 19:22:49 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36336 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdEGXWr (ORCPT ); Sun, 7 May 2017 19:22:47 -0400 Subject: Re: [PATCH] net: dsa: loop: Check for memory allocation failure To: Christophe JAILLET , andrew@lunn.ch, vivien.didelot@savoirfairelinux.com References: <20170506052945.2639-1-christophe.jaillet@wanadoo.fr> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org From: Florian Fainelli Message-ID: <8a792a74-f1f1-59a0-df46-5f6c3861fa20@gmail.com> Date: Sun, 7 May 2017 16:22:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170506052945.2639-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/05/17 à 22:29, Christophe JAILLET a écrit : > 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 Acked-by: Florian Fainelli -- Florian