Commit 435c8eb5 authored by Matthew Dharm's avatar Matthew Dharm Committed by Greg Kroah-Hartman

[PATCH] USB usb-storage: host a host refcount a little bit longer

This patch makes us hold the host reference count a little bit longer in
the /proc interface code.  We were releasing it too early before.
parent a16a8158
...@@ -290,7 +290,6 @@ static int usb_storage_proc_info (char *buffer, char **start, off_t offset, ...@@ -290,7 +290,6 @@ static int usb_storage_proc_info (char *buffer, char **start, off_t offset,
return -ESRCH; return -ESRCH;
} }
us = (struct us_data*)hostptr->hostdata[0]; us = (struct us_data*)hostptr->hostdata[0];
scsi_host_put(hostptr);
/* if we couldn't find it, we return an error */ /* if we couldn't find it, we return an error */
if (!us) { if (!us) {
...@@ -309,6 +308,9 @@ static int usb_storage_proc_info (char *buffer, char **start, off_t offset, ...@@ -309,6 +308,9 @@ static int usb_storage_proc_info (char *buffer, char **start, off_t offset,
SPRINTF(" Protocol: %s\n", us->protocol_name); SPRINTF(" Protocol: %s\n", us->protocol_name);
SPRINTF(" Transport: %s\n", us->transport_name); SPRINTF(" Transport: %s\n", us->transport_name);
/* release the reference count on this host */
scsi_host_put(hostptr);
/* /*
* Calculate start of next buffer, and return value. * Calculate start of next buffer, and return value.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment