Messages in this thread | | | Subject | Re: [PATCH v4] usbip: dynamically allocate idev by nports found in sysfs | From | Shuah Khan <> | Date | Tue, 29 May 2018 15:28:55 -0600 |
| |
On 05/25/2018 08:23 AM, Michael Grzeschik wrote: > As the amount of available ports varies by the kernels build > configuration. To remove the limitation of the fixed 128 ports > we allocate the amount of idevs by using the number we get > from the kernel. > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > --- > v1 -> v2: - reworked memory allocation into one calloc call > - added error path on allocation failure > v2 -> v3: - moved check for available nports to beginning of function > v3 -> v4: - changed get_nports to get hc_device via parameter > - moved calloc after valid get_nports call >
Thanks. Looks good to me. It works now and doesn't segfault :)
Acked-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
thanks, -- Shuah
| |