Skip to content

Commit

Permalink
Staging: ipack: fix wrong return value.
Browse files Browse the repository at this point in the history
In case it is not possible to remap the memory, it returns 0 and
the driver thinks that everything went fine.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent 26c295c commit 58b2c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int ipack_device_read_id(struct ipack_device *dev)
dev->region[IPACK_ID_SPACE].size);
if (!idmem) {
dev_err(&dev->dev, "error mapping memory\n");
return ret;
return -ENOMEM;
}

/* Determine ID PROM Data Format. If we find the ids "IPAC" or "IPAH"
Expand Down

0 comments on commit 58b2c0c

Please sign in to comment.