From: Nathan Chancellor Date: Sun, 1 Apr 2018 03:56:23 +0000 (-0700) Subject: ANDROID: xt_qtaguid: Remove unnecessary null checks to device's name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=94ab648b00e46743c50e2f50e556bcfef7456e90;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ANDROID: xt_qtaguid: Remove unnecessary null checks to device's name 'name' will never be NULL since it isn't a plain pointer but an array of char values. ../net/netfilter/xt_qtaguid.c:1195:27: warning: address of array '(*el_dev)->name' will always evaluate to 'true' [-Wpointer-bool-conversion] if (unlikely(!(*el_dev)->name)) { ~~~~~~~~~~~~^~~~ Change-Id: If3b25f17829b43e8a639193fb9cd04ae45947200 Signed-off-by: Nathan Chancellor (cherry picked from android-4.4 commit 207b579e3db6fd0cb6fe40ba3e929635ad748d89) Signed-off-by: Chenbo Feng --- diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c index cd7c34b45221..d261932ee595 100644 --- a/net/netfilter/xt_qtaguid.c +++ b/net/netfilter/xt_qtaguid.c @@ -1194,11 +1194,6 @@ static void get_dev_and_dir(const struct sk_buff *skb, parst->hook, __func__); BUG(); } - if (unlikely(!(*el_dev)->name)) { - pr_err("qtaguid[%d]: %s(): no dev->name?!!\n", - parst->hook, __func__); - BUG(); - } if (skb->dev && *el_dev != skb->dev) { MT_DEBUG("qtaguid[%d]: skb->dev=%p %s vs par->%s=%p %s\n", parst->hook, skb->dev, skb->dev->name,