Received: by 10.223.164.202 with SMTP id h10csp1567822wrb; Sat, 11 Nov 2017 09:48:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMZxXY+HNlKMIFuXAkhElsieeVjMs/P4iNthmH6KP+Yk3cH6luQSTAen0NUrzkperySj3wa7 X-Received: by 10.159.197.67 with SMTP id d3mr4186992plo.433.1510422538025; Sat, 11 Nov 2017 09:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510422537; cv=none; d=google.com; s=arc-20160816; b=ds+Zr33zMJsMAbjCZHIzvNwAhUkFrT9ZN4OD4lDsMMVKiaRXFpvcew+Wc/hfBmffx+ kziX9xXfmggnEpgoUDa1NgYTIf6EMd/nRV7Ia/p5kake/XGIVokIKQSnv9RRzT7ihBM7 QXrLlbx1DpQCt14BPAn7R/srutqaRbV3KzIq3fk56iIZhWGqy9XFYdnj6BlV4vr7oALZ ZPFQ3gw/pRSx5jQzPn1YQB/buki93UY6n8n2wRAFnWE5vo91m6NU4u7VkNiHZ6TPGEMq EgOXJ5mgT5PB9ZJLz7nMLwr1ctLAP5GvasYHXDnSw6l9Ns+BQaa4VgNoPQsdKivtrhHS Z5fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=YrJkI9er14YXYhQZHJ87IZcTGhF/8uTF693zWoSNGUE=; b=arjOIAtcQxk8oih4ZsHH4umWf9l6QaRIraa1jfq0jl6FbbvYjeyW1DOiGHUeRUhiG+ MYuozuX8HKVVCqq0T2Sz7ApWODAIu9hjEr4RBjN5+TKu/BXtu6Ow5gVC7462NBtKJK62 n7iFRiueqCoXYKI32ccf8Dm2buZ17QqsfDLIr9o03d/j+9Frih/u/PhorFMDJkobREIL oLFjGASaurAXQJL3YPVghW9tjIiMxl/YPIr7zduz0xKHLKHXbm98/VoNze9g9igxgGhS keYm1dyi8m6a89CAc/ycM0FUFHR7bRzz9ZbKm4yHcyIKUC1PT6wpWOwRxaT6EpqSqfeM jxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vzzv83Ib; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61si11384530plr.279.2017.11.11.09.48.37; Sat, 11 Nov 2017 09:48:57 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vzzv83Ib; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbdKKRrj (ORCPT + 84 others); Sat, 11 Nov 2017 12:47:39 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:50097 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbdKKRrh (ORCPT ); Sat, 11 Nov 2017 12:47:37 -0500 Received: by mail-pg0-f68.google.com with SMTP id g6so9717663pgn.6; Sat, 11 Nov 2017 09:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YrJkI9er14YXYhQZHJ87IZcTGhF/8uTF693zWoSNGUE=; b=Vzzv83IbczVLbFBnTs1krGd2deG8FwddsxnOx8GAHZ1LGWVwejRDGRGWIkXiAiqj4V h3cs+fJDQetZEMphD5w/QlJi7rGcqlCVXW5Ogx/l2GgyrJuHR7FRygemuVb5Mtj1y82K 2d/q5o+dRUzfE9ixTEw86edwwwJSbWgbycsAv3a0NnqZ7vmWq3M+xtg6wmD0RfX4IsQz DiQBQo8oQPT9PuBNh24yDLwvEuB/mfeoumimPiZzBnlvF380i854SnAxYO1QHzYdgoe6 Y7VB4F3x+l9akQO36bgYVFcM9lBXOiw8UAN6X1Ec41gsLF+OxECya92NfepNYE2tCjqc FN1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YrJkI9er14YXYhQZHJ87IZcTGhF/8uTF693zWoSNGUE=; b=W4AM+FqlWny8UjRAxaCfS3MbL95+Gg3J9XtmBNdEnosRuzkWncQjHEpavFdx6uGV69 iUmI2+2ByKbbyUIMaWQlKDpc5HKRof+ZjYx0++7Fxlbpf1/zYYYhXGF5dPUnTNiAxo8V X8EI9FXnZBkrlDyvzGIyi/h15TYD4EcrxpubANFwGSVkPC8i4Dz+TJZTYuzM8888QpK3 N3gdnO0P5SKrOwJzZ+YE9nh8feB9rKWJ/HIxUV4BnBhP8yM8OGZKp3JcWdLsIWFcbCw0 v8nAVsGGthUUQZ43WXi6PwrkZRzHHkCQ4C2zUPMTVIBXtZyGKMMOeOQtQIfAUlblnlj5 JfMA== X-Gm-Message-State: AJaThX4oFpkcp2O2zA9j+az4PUEtMblKSjY4qWJBEZYaULQIYq4eafot xbz0ppbIee9Fk9sm9I2d2sO3xg== X-Received: by 10.84.194.195 with SMTP id h61mr4162953pld.72.1510422457048; Sat, 11 Nov 2017 09:47:37 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id g11sm23683298pfe.41.2017.11.11.09.47.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Nov 2017 09:47:35 -0800 (PST) From: Arvind Yadav To: rjw@rjwysocki.net Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH] powercap: Remove reassignment Date: Sat, 11 Nov 2017 23:17:26 +0530 Message-Id: <00329a239c8b1640a9e491b6a90a5b20fd45e42c.1510422357.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is not necessary to reassignment of 'result'. Here, result is being initialized zero and then updated with seed_constraint_attributes(). class_register is enough to return successful and error value. Signed-off-by: Arvind Yadav --- drivers/powercap/powercap_sys.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index 5b10b50..64b2b25 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -673,15 +673,13 @@ EXPORT_SYMBOL_GPL(powercap_unregister_control_type); static int __init powercap_init(void) { - int result = 0; + int result; result = seed_constraint_attributes(); if (result) return result; - result = class_register(&powercap_class); - - return result; + return class_register(&powercap_class); } device_initcall(powercap_init); -- 2.7.4 From 1586781243977082175@xxx Thu Dec 14 17:28:38 +0000 2017 X-GM-THRID: 1586533440851029553 X-Gmail-Labels: Inbox,Category Forums