Hello Chuhong,
Sorry I missed 'if (PTR_ERR(desc) == -ENOENT)' check
Can you in this case add an error message ?
Regards
Mickael
On 10/17/19 09:48, Chuhong Yuan wrote:
> On Thu, Oct 17, 2019 at 1:43 PM Mickael GUENE wrote:
>>
>> Hello Chuhong,
>>
>> Is this check necessary ?
>> since lo
On Thu, Oct 17, 2019 at 1:43 PM Mickael GUENE wrote:
>
> Hello Chuhong,
>
> Is this check necessary ?
> since looking into code it seems to me devm_gpiod_get_optional() can only
> return NULL in case of error due to following check in
> devm_gpiod_get_index_optional()
> if (IS_ERR(desc))
Hello Chuhong,
Is this check necessary ?
since looking into code it seems to me devm_gpiod_get_optional() can only
return NULL in case of error due to following check in
devm_gpiod_get_index_optional()
if (IS_ERR(desc)) {
if (PTR_ERR(desc) == -ENOENT)
mipid02_probe misses a check for devm_gpiod_get_optional and may miss
the failure.
Add a check to fix the problem.
Signed-off-by: Chuhong Yuan
---
drivers/media/i2c/st-mipid02.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
4 matches
Mail list logo