3.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Damian Hobson-Garcia <[email protected]>

commit 5ed0505c713805f89473cdc0bbfb5110dfd840cb upstream.

Until recently uio_get_minor() returned 0 for success and
a negative value on failure.  This became non-negative for suceess and
negative for failure.  Restore the original return value spec so that we can
successfully initialize UIO devices with a non-zero minor device
number.

Signed-off-by: Damian Hobson-Garcia <[email protected]>
Cc: "Hans J. Koch" <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/uio/uio.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -374,6 +374,7 @@ static int uio_get_minor(struct uio_devi
        retval = idr_alloc(&uio_idr, idev, 0, UIO_MAX_DEVICES, GFP_KERNEL);
        if (retval >= 0) {
                idev->minor = retval;
+               retval = 0;
        } else if (retval == -ENOSPC) {
                dev_err(idev->dev, "too many uio devices\n");
                retval = -EINVAL;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to