diff options
| author | 2012-05-24 01:13:01 -0700 | |
|---|---|---|
| committer | 2012-05-24 01:13:01 -0700 | |
| commit | e644dae645e167d154c0526358940986682a72b0 (patch) | |
| tree | 972993c6568085b8d407fc7e13de10f4b93c651d /drivers/net/netconsole.c | |
| parent | Input: synaptics - fix regression with "image sensor" trackpads (diff) | |
| parent | Input: matrix-keymap - fix building keymaps (diff) | |
| download | wireguard-linux-e644dae645e167d154c0526358940986682a72b0.tar.xz wireguard-linux-e644dae645e167d154c0526358940986682a72b0.zip | |
Merge branch 'next' into for-linus
Diffstat (limited to '')
| -rw-r--r-- | drivers/net/netconsole.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index e8882023576b..f9347ea3d381 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -169,10 +169,8 @@ static struct netconsole_target *alloc_param_target(char *target_config) * Note that these targets get their config_item fields zeroed-out. */ nt = kzalloc(sizeof(*nt), GFP_KERNEL); - if (!nt) { - printk(KERN_ERR "netconsole: failed to allocate memory\n"); + if (!nt) goto fail; - } nt->np.name = "netconsole"; strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); @@ -551,10 +549,8 @@ static struct config_item *make_netconsole_target(struct config_group *group, * Target is disabled at creation (enabled == 0). */ nt = kzalloc(sizeof(*nt), GFP_KERNEL); - if (!nt) { - printk(KERN_ERR "netconsole: failed to allocate memory\n"); + if (!nt) return ERR_PTR(-ENOMEM); - } nt->np.name = "netconsole"; strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); |
