lkml.org 
[lkml]   [2023]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] phy: mapphone-mdm6600: fix an error code problem in inv_mpu6050_read_raw
From
On 2023/10/23 09:33, Su Hui wrote:
> On 2023/10/20 23:55, Jonathan Cameron wrote:
>> I'm not sure why inv_mpu6050_sensor_show() doesn't return
>> the actual error code from the regmap_bulk_read() and instead
>> replaces it
>> with -EINVAL.  Given you are tidying up this related issues perhaps
>> change
>> that as well?
>>
>> static int inv_mpu6050_sensor_show(struct inv_mpu6050_state *st, int
>> reg,
>>                    int axis, int *val)
>> {
>>     int ind, result;
>>     __be16 d;
>>
>>     ind = (axis - IIO_MOD_X) * 2;
>>     result = regmap_bulk_read(st->map, reg + ind, &d, sizeof(d));
>>     if (result)
>>         return -EINVAL;
>> //Make this return result;
>
> Sure, I will tidy up this, Thanks for your suggestion!

I'm not sure  whether the caller could handler this  when return
'result' rather than '-EINVAL'.

This is not a big problem, maybe we shouldn't modify this code.

Su Hui

\
 
 \ /
  Last update: 2023-10-23 05:31    [W:0.065 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site