From 999e4bf1d736611b84b6b695531ce29b9319241f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 24 Nov 2016 13:46:23 +0300 Subject: [PATCH] char/pcmcia: add some error checking in scr24x_read() The "ret = " assignment seems to have accidentally been left off. Fixes: f2ed287bcc90 ("char/pcmcia: add scr24x_cs chip card interface driver") Signed-off-by: Dan Carpenter Acked-by: Lubomir Rintel Signed-off-by: Greg Kroah-Hartman --- drivers/char/pcmcia/scr24x_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/pcmcia/scr24x_cs.c b/drivers/char/pcmcia/scr24x_cs.c index a1de354a89a7..f6b43d9350f0 100644 --- a/drivers/char/pcmcia/scr24x_cs.c +++ b/drivers/char/pcmcia/scr24x_cs.c @@ -158,7 +158,7 @@ static ssize_t scr24x_read(struct file *filp, char __user *buf, size_t count, ret = -EIO; goto out; } - read_chunk(dev, CCID_HEADER_SIZE, len); + ret = read_chunk(dev, CCID_HEADER_SIZE, len); if (ret < 0) goto out;