From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:44069 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757650Ab1F2U12 (ORCPT ); Wed, 29 Jun 2011 16:27:28 -0400 Subject: Re: [PATCH] net, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan() From: Johannes Berg To: Jesper Juhl Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , "John W. Linville" , Luciano Coelho In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 29 Jun 2011 22:27:24 +0200 Message-ID: <1309379244.4071.7.camel@jlt3.sipsolutions.net> (sfid-20110629_222733_799640_76DAAF87) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote: > If the 'driver_initiated' function argument to > __cfg80211_stop_sched_scan() is not 0 then we'll return an > uninitialized 'ret' from the function. 'err'. I also dislike the initialisation, can we just replace the "return err;" at the end of the function with "return 0;" instead? Luca, should it maybe be return -ENOENT anyway in the !sched_scan_req case? johannes From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [PATCH] net, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan() Date: Wed, 29 Jun 2011 22:27:24 +0200 Message-ID: <1309379244.4071.7.camel@jlt3.sipsolutions.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "David S. Miller" , "John W. Linville" , Luciano Coelho To: Jesper Juhl Return-path: In-Reply-To: Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote: > If the 'driver_initiated' function argument to > __cfg80211_stop_sched_scan() is not 0 then we'll return an > uninitialized 'ret' from the function. 'err'. I also dislike the initialisation, can we just replace the "return err;" at the end of the function with "return 0;" instead? Luca, should it maybe be return -ENOENT anyway in the !sched_scan_req case? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html