From patchwork Tue Feb 7 14:52:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9560307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3FBC6047A for ; Tue, 7 Feb 2017 14:52:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9697728401 for ; Tue, 7 Feb 2017 14:52:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AF282840B; Tue, 7 Feb 2017 14:52:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46CC328401 for ; Tue, 7 Feb 2017 14:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754745AbdBGOwl (ORCPT ); Tue, 7 Feb 2017 09:52:41 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33112 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754655AbdBGOwj (ORCPT ); Tue, 7 Feb 2017 09:52:39 -0500 Received: by mail-pf0-f195.google.com with SMTP id e4so9462923pfg.0 for ; Tue, 07 Feb 2017 06:52:38 -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:mime-version :content-transfer-encoding; bh=iTrqu75pd3cmDP/uytaZ4LGyoNiTzt+nosQ1hNvAn+8=; b=k3HVN3wLyjhoTgGv5JUlchR36pCPlLbe3t9U/Y5Ho4sThl3lR8jA15H/6Qav2mURzu 6mCoeN0MX3ihfkmB6t6BaDss1MJ+TswSPHfEtWOtSfECNq8Uxxy7OhXL/MA56ML0MEPz TtjA+M09G5r9sx6M0yaYHC2Y/QDEsN6G/GSuvuQga3dWLr7xWy+cso6EhLm234hzdLit y8EWbGcFkRyoSto3btP3QwSC84K0eFVxvN1ouFC0nxteGHm5HUDa4pGS9442khuNWKjx diJ+o8jFLch9jyRlAGZqHEAaTFZWIxI9gJiAltDlWojpicX8Y6cHpQohr9kltg5cejL3 sw1Q== 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:mime-version :content-transfer-encoding; bh=iTrqu75pd3cmDP/uytaZ4LGyoNiTzt+nosQ1hNvAn+8=; b=jJrC3TV8mQHaK8cTc1YI5Zt+4K++QpDKMnrxr581qTOvrwPUqL8hMgQ1gufivoiA4w E7l+B3Cs3XoyGEMZvh2zZCB9AQMS2t0BfpHWnm89xg6ok0tRqHY/GxByT61GJW+Y2nkI jGJBCMYPtCCorUbfDeBPqKNo8UAWvaPZK0B0Y2IZoF3pBk1hY/xBdVYlHoU06rY/RxMt 8V5Ay6nbEAtWlY/mXQXczWUt/TtXWiPM3qYAOFybJ/pYuq90/CpTfaL73sRQHfAz0CLN 5fRxDxs9YPa687MWzRceYNVVrqPHSfIHdsaxNUoubsLzWzYUUAaw62jD+gamaSVHFr6e MpNA== X-Gm-Message-State: AIkVDXKLvmGT47l7z4oJJhVypOyS+i0ssIJOMe29PncOzxRkiluybSZJeNgnnSYU5N46mA== X-Received: by 10.98.64.3 with SMTP id n3mr20359421pfa.2.1486479153474; Tue, 07 Feb 2017 06:52:33 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id 88sm12209841pfr.41.2017.02.07.06.52.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 06:52:32 -0800 (PST) From: Wei Yongjun To: Dmitry Torokhov , Masahiro Yamada , Bjorn Andersson , Benjamin Tissoires , Andrew Duggan , Nick Dyer , Christophe JAILLET Cc: Wei Yongjun , linux-input@vger.kernel.org Subject: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Date: Tue, 7 Feb 2017 14:52:25 +0000 Message-Id: <20170207145225.31228-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun Reviewed-by: Benjamin Tissoires --- drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index bf5c36e..0c54446 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -1049,7 +1049,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL); if (!data->irq_memory) { dev_err(dev, "Failed to allocate memory for irq masks.\n"); - return retval; + return -ENOMEM; } data->irq_status = data->irq_memory + size * 0;