Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[firefly-linux-kernel-4.4.55.git] / drivers / leds / leds-pca9532.c
index bd3b431c9710eccc207228b6daacc049c3e04463..3937244fdcab8bf31562337430996a6cd7a943c2 100644 (file)
@@ -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 */