Return-path: Received: from mga09.intel.com ([134.134.136.24]:24087 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754471Ab3K1EwF (ORCPT ); Wed, 27 Nov 2013 23:52:05 -0500 Subject: Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface() From: Chao Bi To: Ujjal Roy Cc: Johannes Berg , "John W. Linville" , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org In-Reply-To: <1385610818.7437.1.camel@bichao> References: <1385521254.23222.8.camel@bichao> <1385610818.7437.1.camel@bichao> Content-Type: text/plain; charset="UTF-8" Date: Thu, 28 Nov 2013 13:21:37 +0800 Message-ID: <1385616097.7437.8.camel@bichao> (sfid-20131128_055210_918927_7E5AE12A) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, 2013-11-28 at 11:53 +0800, Chao Bi wrote: > On Wed, 2013-11-27 at 20:43 +0530, Ujjal Roy wrote: > > Hi, > > > > > > We can use IS_ERR_OR_NULL(wdev) to check NULL as well as error value. > > > > Thanks, > > UjjaL > > > > On Wed, Nov 27, 2013 at 8:30 AM, Chao Bi wrote: > > In nl80211_new_interface(), it calls rdev_add_virtual_intf() to create > > a new interface, however, it only checks whether returned value is err > > code, but doesn't check if returned value is NULL. The returned > > Thanks Ujjal. I'll update it. > Hi all, This patch is not valid, I further check the nl80211 API introduce, don't need to handle this NULL return value because it bans NULL feedback of add_virtual_intf() API in cfg80211.h.