From patchwork Tue Oct 12 18:33:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12553549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A325C43217 for ; Tue, 12 Oct 2021 18:56:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8FC96103D for ; Tue, 12 Oct 2021 18:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234925AbhJLS62 (ORCPT ); Tue, 12 Oct 2021 14:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234930AbhJLS6J (ORCPT ); Tue, 12 Oct 2021 14:58:09 -0400 Received: from leibniz.telenet-ops.be (leibniz.telenet-ops.be [IPv6:2a02:1800:110:4::f00:d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58D16C06174E for ; Tue, 12 Oct 2021 11:56:06 -0700 (PDT) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4HTPSK73KgzMqfg6 for ; Tue, 12 Oct 2021 20:33:37 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:9c93:91ff:d58:ecfb]) by baptiste.telenet-ops.be with bizsmtp id 56ZX2600B0KW32a016ZXZD; Tue, 12 Oct 2021 20:33:37 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1maMag-004RU4-SY; Tue, 12 Oct 2021 20:33:30 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1maMag-002j6V-3K; Tue, 12 Oct 2021 20:33:30 +0200 From: Geert Uytterhoeven To: Miguel Ojeda Cc: Robin van der Gracht , Rob Herring , Paul Burton , Greg Kroah-Hartman , Pavel Machek , Marek Behun , devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v7 12/21] auxdisplay: ht16k33: Remove unneeded error check in keypad probe() Date: Tue, 12 Oct 2021 20:33:18 +0200 Message-Id: <20211012183327.649865-13-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012183327.649865-1-geert@linux-m68k.org> References: <20211012183327.649865-1-geert@linux-m68k.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org There is no need to check the return code of input_register_device(), just propagate it to the caller. Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht --- v7: - No changes, v6: - No changes, v5: - No changes, v4: - No changes, v3: - No changes, v2: - Add Acked-by. --- drivers/auxdisplay/ht16k33.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index fed2f8bd2d27c65b..1ce73c4172c89244 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -388,11 +388,7 @@ static int ht16k33_keypad_probe(struct i2c_client *client, ht16k33_keypad_stop(keypad->dev); - err = input_register_device(keypad->dev); - if (err) - return err; - - return 0; + return input_register_device(keypad->dev); } static int ht16k33_probe(struct i2c_client *client,