Re: [PATCH 2/2] can: m_can: m_can_class_allocate_dev(): remove impossible error return judgment

2021-02-05 Thread Marc Kleine-Budde
On 05.02.2021 16:46:16, Xulin Sun wrote: > On 2021/2/5 下午4:19, Marc Kleine-Budde wrote: > > On 05.02.2021 15:25:59, Xulin Sun wrote: > > > If the previous can_net device has been successfully allocated, its > > > private data structure is impossible to be empty, remove this redundant > > > error

Re: [PATCH 2/2] can: m_can: m_can_class_allocate_dev(): remove impossible error return judgment

2021-02-05 Thread Xulin Sun
On 2021/2/5 下午4:19, Marc Kleine-Budde wrote: On 05.02.2021 15:25:59, Xulin Sun wrote: If the previous can_net device has been successfully allocated, its private data structure is impossible to be empty, remove this redundant error return judgment. Otherwise, memory leaks for alloc_candev()

Re: [PATCH 2/2] can: m_can: m_can_class_allocate_dev(): remove impossible error return judgment

2021-02-05 Thread Marc Kleine-Budde
On 05.02.2021 15:25:59, Xulin Sun wrote: > If the previous can_net device has been successfully allocated, its > private data structure is impossible to be empty, remove this redundant > error return judgment. Otherwise, memory leaks for alloc_candev() will > be triggered. Your analysis is

[PATCH 2/2] can: m_can: m_can_class_allocate_dev(): remove impossible error return judgment

2021-02-04 Thread Xulin Sun
If the previous can_net device has been successfully allocated, its private data structure is impossible to be empty, remove this redundant error return judgment. Otherwise, memory leaks for alloc_candev() will be triggered. Signed-off-by: Xulin Sun --- drivers/net/can/m_can/m_can.c | 5 -