On 7/29/2018 4:32 AM, Wolfram Sang wrote:
> On Tue, Jun 12, 2018 at 11:09:05AM -0600, Karthikeyan Ramasubramanian wrote:
>> This bus driver supports the GENI based i2c hardware controller in the
>> Qualcomm SOCs. The Qualcomm Generic Interface (GENI) is a programmable
>> module supporting a wide range of serial interfaces including I2C. The
>> driver supports FIFO mode and DMA mode of transfer and switches modes
>> dynamically depending on the size of the transfer.
>>
>> Signed-off-by: Karthikeyan Ramasubramanian <[email protected]>
>> Signed-off-by: Sagar Dharia <[email protected]>
>> Signed-off-by: Girish Mahadevan <[email protected]>
>> Reviewed-by: Douglas Anderson <[email protected]>
> 
> Looks good except one minor thing:
> 
>> +    pm_runtime_set_suspended(gi2c->se.dev);
>> +    pm_runtime_set_autosuspend_delay(gi2c->se.dev, I2C_AUTO_SUSPEND_DELAY);
>> +    pm_runtime_use_autosuspend(gi2c->se.dev);
>> +    pm_runtime_enable(gi2c->se.dev);
>> +    i2c_add_adapter(&gi2c->adap);
>> +
>> +    return 0;
> 
> i2c_add_adapter can fail. So, I'd guess you want to check the return
> value and move it above the pm_runtime calls?
> 
Sure, I will update and upload a new patchset.

Regards,
Karthik.
-- 
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Reply via email to