Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
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

Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
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 >

Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
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 chao...@intel.com wrote: In nl80211_new_interface(), it calls rdev_add_virtual_intf() to create

Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
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 chao...@intel.com wrote: In

[PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-26 Thread Chao Bi
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 value could be NULL, for example, memory allocation failed when creating a new interface.

[PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-26 Thread Chao Bi
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 value could be NULL, for example, memory allocation failed when creating a new interface.