lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] usbip: dynamically allocate idev by nports found in sysfs
From
Date
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

\
 
 \ /
  Last update: 2018-05-29 23:30    [W:0.201 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site