Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp663244imm; Sat, 14 Jul 2018 09:20:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfpvyTJ4d1raGd7rKjLO6ii4HB/JgseY2nLhgfs5Hbq4e6uYga3Xd0FlX7t6QGoGegA4zi0 X-Received: by 2002:a63:b02:: with SMTP id 2-v6mr3877536pgl.301.1531585200628; Sat, 14 Jul 2018 09:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531585200; cv=none; d=google.com; s=arc-20160816; b=ts2pS+AhGch+jmZthMK10YiklIINq/PZgJw//9X2ne4/2ruqN6W31cO7So+PKAIhnu GYuefABQAxy2B6yX/BkWZtEzWwOuYnQkCz0IqtKwzyIqpuZ4INtuVDAO7gUu/3n77uEG pHF8c3FjnsFtBXv2/w9AoGFT9WrWFoaZYKZXYfCkuJgSL5MaQzGcvSZIP/rrpWeorSMj /ngAzYuic0EDf69ATy0boMkhwDX5WQjcRUYTxrhbTajOR3nC+EgQeS7rRgiN13vMippp zsIs/lX9cut63vIR7Rz88ofjYAJogjlheJZ5abBpcd0PEFi/WGDuHCXlmwBPa9ua3ZxY Y5Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=/lcm5ezov6Elrf/n6MXY9fJT2w4Jlg8rMi9Tc0G3aPs=; b=hkae9Tazmknf9EiVj4zy2O2OH6vr3sw5oFjsskrj093HyikdcIGAHDyotbCV77+MaJ 76cb/Fz539kEr8MBehWySDYhyHTBYIQEbcxUgdb1tJZ/xhAnWCLAz006AMrLM/NajrNV IBHDyOqOgxbspui2B7bWplv4lrCNYQg4WJ75HWosuLbocUoNU47n8MEvxkIm5hllKhXH aqP8LJHfKCZ6SEx3KKkAz97PirdBqbP966EDw6qtlrp/qrJdMQynqsDXb91dO6sOH5YK djW0oZigx+WEtDwzwEhNP7v12n+CpJFPEkJiviITj1D1etZQ0BTxgs+6tj1Jl6K7/R1o vTaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65-v6si27594469pfw.95.2018.07.14.09.19.45; Sat, 14 Jul 2018 09:20:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731086AbeGNQio (ORCPT + 99 others); Sat, 14 Jul 2018 12:38:44 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50894 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727086AbeGNQio (ORCPT ); Sat, 14 Jul 2018 12:38:44 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1feNGG-0007YB-OD; Sat, 14 Jul 2018 16:19:08 +0000 From: Colin King To: John Johansen , James Morris , "Serge E . Hallyn" , linux-security-module@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] apparmor: remove redundant pointer 'info' Date: Sat, 14 Jul 2018 17:19:05 +0100 Message-Id: <20180714161905.5403-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Pointer 'info' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'info' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- security/apparmor/domain.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index 098d546d8253..410d9ce09861 100644 --- a/security/apparmor/domain.c +++ b/security/apparmor/domain.c @@ -1006,7 +1006,6 @@ static struct aa_label *build_change_hat(struct aa_profile *profile, const char *name, bool sibling) { struct aa_profile *root, *hat = NULL; - const char *info = NULL; int error = 0; if (sibling && PROFILE_IS_HAT(profile)) { @@ -1014,7 +1013,6 @@ static struct aa_label *build_change_hat(struct aa_profile *profile, } else if (!sibling && !PROFILE_IS_HAT(profile)) { root = aa_get_profile(profile); } else { - info = "conflicting target types"; error = -EPERM; goto audit; } @@ -1025,10 +1023,8 @@ static struct aa_label *build_change_hat(struct aa_profile *profile, if (COMPLAIN_MODE(profile)) { hat = aa_new_null_profile(profile, true, name, GFP_KERNEL); - if (!hat) { - info = "failed null profile create"; + if (!hat) error = -ENOMEM; - } } } aa_put_profile(root); -- 2.17.1