Thread (20 messages) 20 messages, 7 authors, 2017-10-12

Re: [PATCH 05/10] drivers:net: return -ENOMEM on allocation failure.

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-09-13 12:09:16
Also in: dri-devel, linux-btrfs, linux-crypto, linux-fbdev, linux-scsi, lkml, nouveau, target-devel

On Wed, Sep 13, 2017 at 01:02:14PM +0530, Allen Pais wrote:
Signed-off-by: Allen Pais <redacted>
Hi Allen

Although correct, if you look higher up the call chain, this appears
to be not so useful.

rlb_initialize() is only called by bond_alb_initialize(), and it
propagates the -1. That is only called by bond_open() with:

	if (bond_alb_initialize(bond, (BOND_MODE(bond) == BOND_MODE_ALB)))
		return -ENOMEM;

So you might want to also modify this code, to return the return
value, rather than use the hard coded ENOMEM.

Since you code is OK as far as it goes:

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help