fsi: scom: Fix NULL dereference
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 6 Aug 2018 02:22:37 +0000 (12:22 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 6 Aug 2018 02:27:04 +0000 (12:27 +1000)
The chardev conversion forgot to copy the fsi_dev,
silly mistake, compounded by a testing mistake on
my side, this specific driver wasn't being tested
properly.

Fixes: d8f4587655f9 "fsi: scom: Convert to use the new chardev"
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/fsi/fsi-scom.c

index 0f303a700f69d1a2180649e030c9f311a8822adc..df94021dd9d12bc32b18873076151d3fccbae5c7 100644 (file)
@@ -598,6 +598,7 @@ static int scom_probe(struct device *dev)
                kfree(scom);
                return -ENODEV;
        }
+       scom->fsi_dev = fsi_dev;
 
        /* Create chardev for userspace access */
        scom->dev.type = &fsi_cdev_type;