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
This commit is contained in:
@@ -166,6 +166,7 @@ static const struct lcd_ops l4f_ops = {
|
||||
static int l4f00242t03_probe(struct spi_device *spi)
|
||||
{
|
||||
struct l4f00242t03_priv *priv;
|
||||
int ret;
|
||||
|
||||
priv = devm_kzalloc(&spi->dev, sizeof(struct l4f00242t03_priv),
|
||||
GFP_KERNEL);
|
||||
@@ -174,7 +175,9 @@ static int l4f00242t03_probe(struct spi_device *spi)
|
||||
|
||||
spi_set_drvdata(spi, priv);
|
||||
spi->bits_per_word = 9;
|
||||
spi_setup(spi);
|
||||
ret = spi_setup(spi);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(&spi->dev, ret, "Unable to setup spi.\n");
|
||||
|
||||
priv->spi = spi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user