Received: by 10.223.164.202 with SMTP id h10csp4412372wrb; Wed, 29 Nov 2017 06:04:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMaaqMAcrF+le6sMasvfiYI354zhHFeRlI2TW5tXGeKiRByvD6K5v/n7d9faaN9Wc6hb0tAf X-Received: by 10.99.7.143 with SMTP id 137mr2874189pgh.158.1511964285358; Wed, 29 Nov 2017 06:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511964285; cv=none; d=google.com; s=arc-20160816; b=t8wusl9/8Kgm/C4gV9opRcW0ZYuHpGcQvUQrDSU+s9+zIpIeAoCHcfdcvM5qogjBWU ltdPaLCEsAq7GnwLP/Y+/gIU7Arf1sdZ1zOH9JtF4ZZVRU+S7+t78kDK5AkV8ZQHaGle cnyENWIsRI9r7sXkO7aBqgPHVuAJSBl4uihrxKwscFOPmgJtHwxrOC53RPvdCQY5n1AT czRanMHy5b1T/0KLvR4r3iC/fZ8TNU9pDMU3TunY95sq96nYHgpDFDTraVkiv6GqJmae jXDKMZLouiu37tQZcfrFB1GwYZN/p7li0NyYM8ov4EmX779MHLvJbhrEnPTDdExo7yLe lCyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=eFxNMuqipKf50tXQpgbALX34RIOL79sDsZ4r8GYxZOA=; b=eYLUES0/EOhcuEyCX0wlaOfNNiblbMIeLUCvF/I0WYFRpigVXdbfuLrcxDUrME201m i4IOWlOTR3fgL0vdJNkobdsAN+1umWoRMUPefCFu6AvcJZ33HvH6ofzgNTzOLul4o0XW UIIz0ppR4Mt00Nd7D7ntqqGtxfFnr79H7X53e7GzTJQ2CQ+1lpFN/O0D84cIv6lX80cY Ljrk8Sgg/BBJ9BR6M2lg+lx3J0829vGdhIniASiMW0k5ECDkeV8Dtbw1WM5iBmMh55g4 ZUoNHB+gkpLwury01s+rxnojJCn9lKWsasL3M+EET/WcvkUn9IigYjq5lmhQMpGszOVc buJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pLakw1NO; 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 o1si1328263pld.226.2017.11.29.06.04.35; Wed, 29 Nov 2017 06:04:45 -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=pLakw1NO; 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 S1753460AbdK2NJD (ORCPT + 70 others); Wed, 29 Nov 2017 08:09:03 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:45930 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbdK2NI7 (ORCPT ); Wed, 29 Nov 2017 08:08:59 -0500 Received: by mail-pg0-f68.google.com with SMTP id m25so1469614pgv.12 for ; Wed, 29 Nov 2017 05:08:59 -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:in-reply-to:references :in-reply-to:references; bh=eFxNMuqipKf50tXQpgbALX34RIOL79sDsZ4r8GYxZOA=; b=pLakw1NOl9/FJVFcvdiCQemwh/so2QsP42MW5F/g+cRI8E9A5fnBW9niqq47smtDjb 0NaVyaytom3cROTv3HU7rFb/h1G3BznZ7AnxrZaKUWHdtp/HPqouKFrof030MtKnvgDP kHjjJoCWjwFOkOFGPVGEzAGMIrWZjaorenVAUpbwQNteILFKBKLisQ2ZKXf8fDqGKnHR YkRqoEZ8ihQDWFPaCYUCd8tsmCZi4yKPh594fcjB5Rk1VyqP+Cz5p7sqGbbIrNeDF7OG oz7zvWuE6EuIxHco7Z5t1zmoiyop0zslxtgRhua6FEL7+E/72b0kIs6EoqAutIvzbNsm tORg== 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:in-reply-to :references:in-reply-to:references; bh=eFxNMuqipKf50tXQpgbALX34RIOL79sDsZ4r8GYxZOA=; b=JwzVS1dGJfZ2Sa1kEzYWX1kqLl4mj2nwJ/yQaltL6N72W4dYjbfM8B77iNW4KOgf8r vM0LGq4qwbW6LmFHfruZ2GhnUOjieoPi1uhYO4xZa3vza/eH9NgxLce5kjMJ9wsYpDPa +UOGcn4h17OrXf/Xbt5IUrsek83AN7Pr0J6n4P84Q0McGJFW0DG6fhtJ95ceJXVbXCH2 IMA5azBQhDB5hjI1rDys8ZE7m20egQgl+wmNjAYZHb8sdZ6jv685880b6QsaUSk/k3g8 X4dqNRw+NvF/P8pKjnQLbuwUwp5ucFVRhi3DrcZSchiE2h03FiBjTpofq85Bq14PCc6Z OglA== X-Gm-Message-State: AJaThX4VVnMMUEip6u6mnlbvSOKWwAiJ7uvFixJlY5fcJDvEYkizgCBS lr9pdma1FKMC4NQaGBxMaTvrRg== X-Received: by 10.101.98.131 with SMTP id f3mr2730204pgv.366.1511960938924; Wed, 29 Nov 2017 05:08:58 -0800 (PST) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id u19sm3048124pfh.89.2017.11.29.05.08.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 05:08:58 -0800 (PST) From: Arvind Yadav To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2 v2] misc: enclosure: Remove unnecessary error check Date: Wed, 29 Nov 2017 18:38:32 +0530 Message-Id: <2303e49e483dedad1faa0989c56e8f74a0a8d5ed.1511960503.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <0220d514bcec188234edd53ac55c5c43e8cd2df0.1511960503.git.arvind.yadav.cs@gmail.com> References: <0220d514bcec188234edd53ac55c5c43e8cd2df0.1511960503.git.arvind.yadav.cs@gmail.com> In-Reply-To: <0220d514bcec188234edd53ac55c5c43e8cd2df0.1511960503.git.arvind.yadav.cs@gmail.com> References: <0220d514bcec188234edd53ac55c5c43e8cd2df0.1511960503.git.arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is not necessary to check return value of class_register. enclosure_init returns both successful and error value. Signed-off-by: Arvind Yadav --- changes in v2: subject was incorrect. subsystem/driver was wrong. drivers/misc/enclosure.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index c4c5552..5a17bfe 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c @@ -680,13 +680,7 @@ static DEVICE_ATTR(power_status, S_IRUGO | S_IWUSR, get_component_power_status, static int __init enclosure_init(void) { - int err; - - err = class_register(&enclosure_class); - if (err) - return err; - - return 0; + return class_register(&enclosure_class); } static void __exit enclosure_exit(void) -- 1.9.1 From 1585415474604620509@xxx Wed Nov 29 15:40:18 +0000 2017 X-GM-THRID: 1585415474604620509 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread