Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754902Ab3C0XSX (ORCPT ); Wed, 27 Mar 2013 19:18:23 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:47822 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804Ab3C0XST (ORCPT ); Wed, 27 Mar 2013 19:18:19 -0400 X-AuditID: cbfee68d-b7f786d000005188-2d-51537e39c2ad Message-id: <51537E3A.9050606@samsung.com> Date: Thu, 28 Mar 2013 08:18:18 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-version: 1.0 To: Sachin Kamat Cc: linux-kernel@vger.kernel.org, myungjoo.ham@samsung.com, patches@linaro.org Subject: Re: [PATCH 2/2] extcon: max8997: Fix return value References: <1364383410-15093-1-git-send-email-sachin.kamat@linaro.org> <1364383410-15093-2-git-send-email-sachin.kamat@linaro.org> In-reply-to: <1364383410-15093-2-git-send-email-sachin.kamat@linaro.org> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsVy+t8zXV3LuuBAg4mHzS0u75rDZnG7cQWb xZTDX1gsTv7pZXRg8bhzbQ+bR9+WVYwenzfJBTBHcdmkpOZklqUW6dslcGVcaH3CXjCdp+LP 0U72BsYGri5GTg4JAROJR9OeMUHYYhIX7q1nA7GFBJYxSszZEAtT0967EijOBRRfxCix5PwC RgjnBaPEht0fWUGqeAW0JO6/PckOYrMIqEps/fMabCobUHz/ixtgU0UFwiRWTr/CAlEvKPFj 8j0wWwSo5mX3cqB6Dg5mAT+JiXuDQMLCAlYSPUc6oRa3Mko0nn8BNp9TwEPi1dcNYL3MAjoS +1unsUHY8hKb17xlBmmQEFjGLrH1UDMrxEECEt8mH2IBWSAhICux6QAzxGeSEgdX3GCZwCg2 C8lJs5CM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vbO2 6bEXt6utDpQ3f2T/VG6+qITbp1Bb7vj/GSr2ryZfjzSVZj61QvH2rqkXYxz2pKbK2VrY+v6c xsupzF2yzPesTtj+x3ub9s8xW7ST+59Sp17Q09rZv6NPXGTX//Z64zolluKMREMt5qLiRAB7 PhyzFgMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1763 Lines: 46 On 03/27/2013 08:23 PM, Sachin Kamat wrote: > Return the value obtained from the function instead of hardcoding. > drivers/extcon/extcon-max8997.c:235 max8997_muic_set_path() info: > why not propagate 'ret' from max8997_update_reg() instead of (-11)? > drivers/extcon/extcon-max8997.c:248 max8997_muic_set_path() info: > why not propagate 'ret' from max8997_update_reg() instead of (-11)? > > Signed-off-by: Sachin Kamat > --- > drivers/extcon/extcon-max8997.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c > index 69641bc..05b76b3 100644 > --- a/drivers/extcon/extcon-max8997.c > +++ b/drivers/extcon/extcon-max8997.c > @@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info, > MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK); > if (ret < 0) { > dev_err(info->dev, "failed to update MUIC register\n"); > - return -EAGAIN; > + return ret; > } > > if (attached) > @@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info, > CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); > if (ret < 0) { > dev_err(info->dev, "failed to update MUIC register\n"); > - return -EAGAIN; > + return ret; > } > > dev_info(info->dev, OK, I agree with your opinion. So, can you fix all of these return type on extcon-max8997.c? I'd like to receive one patch related to modification for fixing return type. Thanks, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/