]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: sim: check the label length when setting up device properties
authorBartosz Golaszewski <brgl@bgdev.pl>
Thu, 20 Jan 2022 19:49:48 +0000 (20:49 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Mon, 24 Jan 2022 08:20:02 +0000 (09:20 +0100)
commit1ec80c5f4c6d2474fb6d81788deeb952ff9b3199
treea605551957c404173a3fc1432ded9504a8b694a0
parent991a5e519c2aa1f4ed2bf6e2139997d7e7967cb3
gpio: sim: check the label length when setting up device properties

If the user-space sets the chip label to an empty string - we should
check the length and not override the default name or else line hogs
will not be properly attached.

Fixes: c43e3f54c3df ("gpio: sim: new testing module")
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-sim.c