linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: os_dep: usb_intf.c:  Cleaning up uninitialized variables
@ 2014-06-01 13:23 Rickard Strandqvist
  2014-06-02  9:12 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Rickard Strandqvist @ 2014-06-01 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Rickard Strandqvist, Manu Gupta, Josh Triplett,
	Geert Uytterhoeven, devel, linux-kernel

There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/staging/rtl8188eu/os_dep/usb_intf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index 2e49cd5..fd37360 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -776,7 +776,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
 static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid)
 {
 	struct adapter *if1 = NULL;
-	int status;
+	int status = _FAIL;
 	struct dvobj_priv *dvobj;
 
 	RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_init\n"));
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up uninitialized variables
  2014-06-01 13:23 [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up uninitialized variables Rickard Strandqvist
@ 2014-06-02  9:12 ` Dan Carpenter
  2014-06-02 20:50   ` Rickard Strandqvist
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-06-02  9:12 UTC (permalink / raw)
  To: Rickard Strandqvist
  Cc: Greg Kroah-Hartman, Larry Finger, devel, linux-kernel,
	Josh Triplett, Geert Uytterhoeven, Manu Gupta

On Sun, Jun 01, 2014 at 03:23:40PM +0200, Rickard Strandqvist wrote:
> There is a risk that the variable will be used without being initialized.
> 
> This was largely found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

Someone already sent this one.  You should be working against
linux-next.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up uninitialized variables
  2014-06-02  9:12 ` Dan Carpenter
@ 2014-06-02 20:50   ` Rickard Strandqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Rickard Strandqvist @ 2014-06-02 20:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Larry Finger, devel, linux-kernel,
	Josh Triplett, Geert Uytterhoeven, Manu Gupta

Hi

I mail about this for the first time in early May, but ther were many
other faults in the design of my patch then, had several different
types of errors in the same path etc.


So good that someone was inspired to make a real patch of it even then :)

And i'm getting the linux-next to check before I send any more patches.


Best regards
Rickard Strandqvist


2014-06-02 11:12 GMT+02:00 Dan Carpenter <dan.carpenter@oracle.com>:
> On Sun, Jun 01, 2014 at 03:23:40PM +0200, Rickard Strandqvist wrote:
>> There is a risk that the variable will be used without being initialized.
>>
>> This was largely found by using a static code analysis program called cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Someone already sent this one.  You should be working against
> linux-next.
>
> regards,
> dan carpenter
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-02 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01 13:23 [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up uninitialized variables Rickard Strandqvist
2014-06-02  9:12 ` Dan Carpenter
2014-06-02 20:50   ` Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).