Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164654AbdDXD4i (ORCPT ); Sun, 23 Apr 2017 23:56:38 -0400 Received: from mx4.wp.pl ([212.77.101.11]:40960 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164616AbdDXD4b (ORCPT ); Sun, 23 Apr 2017 23:56:31 -0400 Date: Sun, 23 Apr 2017 20:49:43 -0700 From: Jakub Kicinski To: Pan Bian Cc: Kalle Valo , Matthias Brugger , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH 1/1] mt7601u: check return value of alloc_skb Message-ID: <20170423204943.3ce98a63@laptop> In-Reply-To: <1492930823-17249-1-git-send-email-bianpan2016@163.com> References: <1492930823-17249-1-git-send-email-bianpan2016@163.com> X-Mailer: Claws Mail 3.14.0-49-g1cc35f (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-WP-MailID: 066bb0aca50773332e947484c64c9016 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [wZN0] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 359 Lines: 10 On Sun, 23 Apr 2017 15:00:23 +0800, Pan Bian wrote: > Function alloc_skb() will return a NULL pointer if there is no enough > memory. However, in function mt7601u_mcu_msg_alloc(), its return value > is not validated before it is used. This patch fixes it. > > Signed-off-by: Pan Bian Acked-by: Jakub Kicinski Thanks!