From: Dan Carpenter Date: Fri, 3 Jan 2014 20:59:41 +0000 (+0300) Subject: staging: vt6656: remove an unneeded NULL check X-Git-Tag: v3.14-rc1~150^2~146 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3b371fe4d27bcf208f7a211c372e0b8a9253d7c8;p=users%2Fjedix%2Flinux-maple.git staging: vt6656: remove an unneeded NULL check We dereference "param->u.wpa_key.key" on the next line so the check here is inconsistent. This is only called from iwctl_siwencodeext() and "param->u.wpa_key.key" is a valid pointer. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index 003bd7c614e5f..f4a8a5cb9feb1 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -86,7 +86,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) return ret; } - if (param->u.wpa_key.key && param->u.wpa_key.key_len > sizeof(abyKey)) + if (param->u.wpa_key.key_len > sizeof(abyKey)) return -EINVAL; memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);