From: Samuel Iglesias Gonsalvez Date: Wed, 23 May 2012 13:54:43 +0000 (+0200) Subject: Staging: ipack/bridges/tpci200: tpci200_slot_map_space() should return 0 if succeed. X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=6ad0c486a4e702fa059ea24c2585c416f01f4664;p=linux-edison.git Staging: ipack/bridges/tpci200: tpci200_slot_map_space() should return 0 if succeed. tpci200_slot_map_space() should return 0 if the operation was properly done. If not, the caller will think that something wrong happened. This patch establish the returned value to 0. It is overwritten in case of error. Signed-off-by: Samuel Iglesias Gonsalvez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 85560c72970..0c2a50a1ec0 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -628,7 +628,7 @@ static int tpci200_slot_unregister(struct ipack_device *dev) static int tpci200_slot_map_space(struct ipack_device *dev, unsigned int memory_size, int space) { - int res; + int res = 0; unsigned int size_to_map; void __iomem *phys_address; struct ipack_addr_space *virt_addr_space;