lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/4] i2c: devm_pinctrl_get() usage fixes
Date
Most of the patches just remove the check for NULL for devm_pinctrl_get()
return value since it cannot return NULL.

One patch also sets back rinfo->pinctrl to NULL when devm_pinctrl_get()
returns an error instead of a valid pointer and the driver does not bail
out.
This last change prevents core i2c code to dereference invalid pointer
because it checks for rinfo->pinctrl validity with "if (rinfo->pinctrl)"
before dereferencing it.

Yann Sionneau (4):
i2c: mv64xxx: devm_pinctrl_get() cannot return NULL
i2c: at91-master: devm_pinctrl_get() cannot return NULL
i2c: i2c-cadence: Reset pinctrl to NULL in case devm_pinctrl_get()
fails
i2c: imx: devm_pinctrl_get() cannot return NULL

drivers/i2c/busses/i2c-at91-master.c | 2 +-
drivers/i2c/busses/i2c-cadence.c | 1 +
drivers/i2c/busses/i2c-imx.c | 2 +-
drivers/i2c/busses/i2c-mv64xxx.c | 2 --
4 files changed, 3 insertions(+), 4 deletions(-)

--
2.34.1

\
 
 \ /
  Last update: 2023-08-16 22:06    [W:0.055 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site