diff options
Diffstat (limited to 'drivers/net/chelsio/ixf1010.c')
-rw-r--r-- | drivers/net/chelsio/ixf1010.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/chelsio/ixf1010.c b/drivers/net/chelsio/ixf1010.c index 5b8f144e83d4..91a5bf711b8f 100644 --- a/drivers/net/chelsio/ixf1010.c +++ b/drivers/net/chelsio/ixf1010.c | |||
@@ -273,7 +273,8 @@ static int mac_set_rx_mode(struct cmac *mac, struct t1_rx_mode *rm) | |||
273 | static int mac_set_mtu(struct cmac *mac, int mtu) | 273 | static int mac_set_mtu(struct cmac *mac, int mtu) |
274 | { | 274 | { |
275 | /* MAX_FRAME_SIZE inludes header + FCS, mtu doesn't */ | 275 | /* MAX_FRAME_SIZE inludes header + FCS, mtu doesn't */ |
276 | if (mtu > (MAX_FRAME_SIZE - 14 - 4)) return -EINVAL; | 276 | if (mtu > (MAX_FRAME_SIZE - 14 - 4)) |
277 | return -EINVAL; | ||
277 | t1_tpi_write(mac->adapter, MACREG(mac, REG_MAX_FRAME_SIZE), | 278 | t1_tpi_write(mac->adapter, MACREG(mac, REG_MAX_FRAME_SIZE), |
278 | mtu + 14 + 4); | 279 | mtu + 14 + 4); |
279 | return 0; | 280 | return 0; |
@@ -460,10 +461,12 @@ static struct cmac *ixf1010_mac_create(adapter_t *adapter, int index) | |||
460 | struct cmac *mac; | 461 | struct cmac *mac; |
461 | u32 val; | 462 | u32 val; |
462 | 463 | ||
463 | if (index > 9) return NULL; | 464 | if (index > 9) |
465 | return NULL; | ||
464 | 466 | ||
465 | mac = kzalloc(sizeof(*mac) + sizeof(cmac_instance), GFP_KERNEL); | 467 | mac = kzalloc(sizeof(*mac) + sizeof(cmac_instance), GFP_KERNEL); |
466 | if (!mac) return NULL; | 468 | if (!mac) |
469 | return NULL; | ||
467 | 470 | ||
468 | mac->ops = &ixf1010_ops; | 471 | mac->ops = &ixf1010_ops; |
469 | mac->instance = (cmac_instance *)(mac + 1); | 472 | mac->instance = (cmac_instance *)(mac + 1); |