]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Thu, 3 Mar 2022 12:39:14 +0000 (20:39 +0800)
committerWolfram Sang <wsa@kernel.org>
Wed, 20 Sep 2023 21:26:37 +0000 (23:26 +0200)
commit7c0195fa9a9e263df204963f88a22b21688ffb66
treeb2c46599bb8953d63d4f270c9a8d68737d680be8
parent2409205acd3c7c877f3d0080cac6a5feb3358f83
i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()

devm_kstrdup() returns pointer to allocated string on success,
NULL on failure. So it is better to check the return value of it.

Fixes: e35478eac030 ("i2c: mux: demux-pinctrl: run properly with multiple instances")
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/muxes/i2c-demux-pinctrl.c