summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-08-06 04:22:37 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-08-06 04:27:04 +0200
commitaa1221b2584f06066d1e6b22ef7950fb12d94864 (patch)
tree90817a78023f2ae796529e39896d4f7dcdb3ed8d
parentfsi: Prevent multiple concurrent rescans (diff)
downloadlinux-aa1221b2584f06066d1e6b22ef7950fb12d94864.tar.xz
linux-aa1221b2584f06066d1e6b22ef7950fb12d94864.zip
fsi: scom: Fix NULL dereference
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>
-rw-r--r--drivers/fsi/fsi-scom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c
index 0f303a700f69..df94021dd9d1 100644
--- a/drivers/fsi/fsi-scom.c
+++ b/drivers/fsi/fsi-scom.c
@@ -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;