Skip to content

Commit 20d9ba7

Browse files
committed
Merge tag 'backlight-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight update from Lee Jones: - Added a check for the return value of spi_setup() in the l4f00242t03 driver to catch errors * tag 'backlight-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: l4f00242t03: Add check for spi_setup
2 parents f2debe0 + fea88a1 commit 20d9ba7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/video/backlight/l4f00242t03.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ static const struct lcd_ops l4f_ops = {
166166
static int l4f00242t03_probe(struct spi_device *spi)
167167
{
168168
struct l4f00242t03_priv *priv;
169+
int ret;
169170

170171
priv = devm_kzalloc(&spi->dev, sizeof(struct l4f00242t03_priv),
171172
GFP_KERNEL);
@@ -174,7 +175,9 @@ static int l4f00242t03_probe(struct spi_device *spi)
174175

175176
spi_set_drvdata(spi, priv);
176177
spi->bits_per_word = 9;
177-
spi_setup(spi);
178+
ret = spi_setup(spi);
179+
if (ret < 0)
180+
return dev_err_probe(&spi->dev, ret, "Unable to setup spi.\n");
178181

179182
priv->spi = spi;
180183

0 commit comments

Comments
 (0)