[PATCH 0/4] i2c: devm_pinctrl_get() usage fixes

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

 



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




[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