Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fbc3a9b authored by Riku Voipio's avatar Riku Voipio Committed by Richard Purdie
Browse files

leds: Fix &&/|| confusion in leds-pca9532.c



This fixes the expression in the driver to do the correct thing,
not that I think anyone would send SND_* without EV_SND.

Thanks to Roel Kluin <roel.kluin@gmail.com> for noticing.

Signed-off-by: default avatarRiku Voipio <riku.voipio@iki.fi>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent b0edba7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ static int pca9532_event(struct input_dev *dev, unsigned int type,
{
	struct pca9532_data *data = input_get_drvdata(dev);

	if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
	if (!(type == EV_SND && (code == SND_BELL || code == SND_TONE)))
		return -1;

	/* XXX: allow different kind of beeps with psc/pwm modifications */