[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1428492040-5581-14-git-send-email-sudipm.mukherjee@gmail.com>
Date: Wed, 8 Apr 2015 16:50:39 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jean Delvare <jdelvare@...e.de>,
Wolfram Sang <wsa@...-dreams.de>,
Rodolfo Giometti <giometti@...eenne.com>,
"James E.J. Bottomley" <JBottomley@...allels.com>,
Mark Brown <broonie@...nel.org>,
Willy Tarreau <willy@...a-x.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
netdev@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-spi@...r.kernel.org, devel@...verdev.osuosl.org,
alsa-devel@...a-project.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH 13/14] ppdev: return proper error values from attach
now that we are monitoring the return value from attach, make the
required changes to return proper value from its attach function.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/char/ppdev.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index ae0b42b..14374d7 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -748,10 +748,14 @@ static const struct file_operations pp_fops = {
.release = pp_release,
};
-static void pp_attach(struct parport *port)
+static int pp_attach(struct parport *port)
{
- device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number),
- NULL, "parport%d", port->number);
+ struct device *dev;
+
+ dev = device_create(ppdev_class, port->dev,
+ MKDEV(PP_MAJOR, port->number), NULL,
+ "parport%d", port->number);
+ return PTR_ERR_OR_ZERO(dev);
}
static void pp_detach(struct parport *port)
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists