Re: [PATCH v7 4/8] can: m_can: Move allocation of net device to probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

On Monday 15 January 2018 07:22 PM, Marc Kleine-Budde wrote:
> On 01/10/2018 11:55 AM, Faiz Abbas wrote:
>> With the version no longer required to allocate the net device, it can
>> be moved to probe and the alloc_m_can_dev() function can be simplified.
>>
>> Therefore, move the allocation of net device to probe and change
>> alloc_m_can_dev() to setup_m_can_dev().
> 
> The error handling is broken with this patch,
> 
> Have a look at the switch (priv->version) in setup_m_can_dev(), you free
> the m_can_dev in case of error, but exit with -EINVAL in the beginning
> of the function. setup_m_can_dev() should not free if it doesn't allocate.
> 
> The error handling in m_can_plat_probe() is broken, too. If
> pm_runtime_get_sync(&pdev->dev) fails, you don't free the candev.
> 

Will fix.

Thanks,
Faiz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux