diff options
Diffstat (limited to 'drivers/vme')
-rw-r--r-- | drivers/vme/bridges/vme_tsi148.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index 9c1aa4dc39c9..94ce64d7a5f6 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c | |||
@@ -169,7 +169,7 @@ static u32 tsi148_VERR_irqhandler(struct vme_bridge *tsi148_bridge) | |||
169 | unsigned int error_addr_high, error_addr_low; | 169 | unsigned int error_addr_high, error_addr_low; |
170 | unsigned long long error_addr; | 170 | unsigned long long error_addr; |
171 | u32 error_attrib; | 171 | u32 error_attrib; |
172 | struct vme_bus_error *error; | 172 | struct vme_bus_error *error = NULL; |
173 | struct tsi148_driver *bridge; | 173 | struct tsi148_driver *bridge; |
174 | 174 | ||
175 | bridge = tsi148_bridge->driver_priv; | 175 | bridge = tsi148_bridge->driver_priv; |
@@ -186,16 +186,22 @@ static u32 tsi148_VERR_irqhandler(struct vme_bridge *tsi148_bridge) | |||
186 | "Occurred\n"); | 186 | "Occurred\n"); |
187 | } | 187 | } |
188 | 188 | ||
189 | error = kmalloc(sizeof(struct vme_bus_error), GFP_ATOMIC); | 189 | if (err_chk) { |
190 | if (error) { | 190 | error = kmalloc(sizeof(struct vme_bus_error), GFP_ATOMIC); |
191 | error->address = error_addr; | 191 | if (error) { |
192 | error->attributes = error_attrib; | 192 | error->address = error_addr; |
193 | list_add_tail(&error->list, &tsi148_bridge->vme_errors); | 193 | error->attributes = error_attrib; |
194 | } else { | 194 | list_add_tail(&error->list, &tsi148_bridge->vme_errors); |
195 | dev_err(tsi148_bridge->parent, "Unable to alloc memory for " | 195 | } else { |
196 | "VMEbus Error reporting\n"); | 196 | dev_err(tsi148_bridge->parent, |
197 | dev_err(tsi148_bridge->parent, "VME Bus Error at address: " | 197 | "Unable to alloc memory for VMEbus Error reporting\n"); |
198 | "0x%llx, attributes: %08x\n", error_addr, error_attrib); | 198 | } |
199 | } | ||
200 | |||
201 | if (!error) { | ||
202 | dev_err(tsi148_bridge->parent, | ||
203 | "VME Bus Error at address: 0x%llx, attributes: %08x\n", | ||
204 | error_addr, error_attrib); | ||
199 | } | 205 | } |
200 | 206 | ||
201 | /* Clear Status */ | 207 | /* Clear Status */ |