[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ff65fc05-b992-ed76-909d-37935287307a@huawei.com>
Date: Fri, 9 Oct 2020 09:10:17 +0800
From: miaoqinglang <miaoqinglang@...wei.com>
To: Johan Hovold <johan@...nel.org>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] gnss: simplify the return expression of gnss_uevent
在 2020/10/8 22:42, Johan Hovold 写道:
> On Mon, Sep 21, 2020 at 09:10:28PM +0800, Qinglang Miao wrote:
>> Simplify the return expression.
>>
>> Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
>
> The current code was written with an explicit error path on purpose, and
> there's no need to change it.
>
> Same applies to your other gnss ubx patch.
>
Glad for knowing that and it sounds resonable to me.
Thanks.
>> ---
>> drivers/gnss/core.c | 7 +------
>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
>> index e6f94501c..e6b9ac9da 100644
>> --- a/drivers/gnss/core.c
>> +++ b/drivers/gnss/core.c
>> @@ -368,13 +368,8 @@ ATTRIBUTE_GROUPS(gnss);
>> static int gnss_uevent(struct device *dev, struct kobj_uevent_env *env)
>> {
>> struct gnss_device *gdev = to_gnss_device(dev);
>> - int ret;
>>
>> - ret = add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev));
>> - if (ret)
>> - return ret;
>> -
>> - return 0;
>> + return add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev));
>> }
>>
>> static int __init gnss_module_init(void)
>
> Johan
> .
>
Powered by blists - more mailing lists