Re: [PATCH RESEND 1/2] i2c: tegra: Add GPCDMA support

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

 



19.08.2022 15:23, Akhil R пишет:
>  	if (of_device_is_compatible(np, "nvidia,tegra210-i2c-vi"))
>  		i2c_dev->is_vi = true;
> +	else
> +		i2c_dev->dma_support = !!(of_find_property(np, "dmas", NULL));

1. You leak the np returned by of_find_property().

2. There is device_property_read_bool() for this kind of property-exists
checks.

3. If "dmas" is missing in DT, then dma_request_chan() should return
NULL and everything will work fine. I suppose you haven't tried to test
this code.



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux