summaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_vic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic/vnic_vic.c')
-rw-r--r--drivers/net/enic/vnic_vic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/enic/vnic_vic.c b/drivers/net/enic/vnic_vic.c
index d769772998c6..197c9d24af82 100644
--- a/drivers/net/enic/vnic_vic.c
+++ b/drivers/net/enic/vnic_vic.c
@@ -25,9 +25,13 @@
struct vic_provinfo *vic_provinfo_alloc(gfp_t flags, u8 *oui, u8 type)
{
- struct vic_provinfo *vp = kzalloc(VIC_PROVINFO_MAX_DATA, flags);
+ struct vic_provinfo *vp;
- if (!vp || !oui)
+ if (!oui)
+ return NULL;
+
+ vp = kzalloc(VIC_PROVINFO_MAX_DATA, flags);
+ if (!vp)
return NULL;
memcpy(vp->oui, oui, sizeof(vp->oui));
OpenPOWER on IntegriCloud