lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200611061737.20994.m.kozlowski@tuxland.pl>
Date:	Mon, 6 Nov 2006 17:37:20 +0100
From:	Mariusz Kozlowski <m.kozlowski@...land.pl>
To:	Florian 'Floe' Echtler <echtler@...tum.de>,
	Andreas 'ad' Deresch <aderesch@...tum.de>,
	Greg Kroah-Hartman <greg@...ah.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.19-rc4] usb idmouse cleanup

Hello,

	Just digging through code and found these needless variable initializations. So here is the patch.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl>

diff -up linux-2.6.19-rc4-orig/drivers/usb/misc/idmouse.c linux-2.6.19-rc4/drivers/usb/misc/idmouse.c
--- linux-2.6.19-rc4-orig/drivers/usb/misc/idmouse.c    2006-11-06 17:08:21.000000000 +0100
+++ linux-2.6.19-rc4/drivers/usb/misc/idmouse.c 2006-11-06 17:32:50.000000000 +0100
@@ -125,12 +125,12 @@ static DEFINE_MUTEX(disconnect_mutex);
 
 static int idmouse_create_image(struct usb_idmouse *dev)
 {
-       int bytes_read = 0;
-       int bulk_read = 0;
-       int result = 0;
+       int bytes_read;
+       int bulk_read;
+       int result;
 
        memcpy(dev->bulk_in_buffer, HEADER, sizeof(HEADER)-1);
-       bytes_read += sizeof(HEADER)-1;
+       bytes_read = sizeof(HEADER)-1;
 
        /* reset the device and set a fast blink rate */
        result = ftip_command(dev, FTIP_RELEASE, 0, 0);
@@ -208,9 +208,9 @@ static inline void idmouse_delete(struct
 
 static int idmouse_open(struct inode *inode, struct file *file)
 {
-       struct usb_idmouse *dev = NULL;
+       struct usb_idmouse *dev;
        struct usb_interface *interface;
-       int result = 0;
+       int result;
 
        /* prevent disconnects */
        mutex_lock(&disconnect_mutex);
@@ -305,7 +305,7 @@ static ssize_t idmouse_read(struct file 
                                loff_t * ppos)
 {
        struct usb_idmouse *dev;
-       int result = 0;
+       int result;
 
        dev = (struct usb_idmouse *) file->private_data;
 
@@ -329,7 +329,7 @@ static int idmouse_probe(struct usb_inte
                                const struct usb_device_id *id)
 {
        struct usb_device *udev = interface_to_usbdev(interface);
-       struct usb_idmouse *dev = NULL;
+       struct usb_idmouse *dev;
        struct usb_host_interface *iface_desc;
        struct usb_endpoint_descriptor *endpoint;
        int result;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ