lkml.org 
[lkml]   [2021]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 5/9] w1: ds2438: fixed a coding style issue in vdd_read
    Date
    Since there is only one statement inside the if clause, no brackets
    are required.

    Signed-off-by: Luiz Sampaio <sampaio.ime@gmail.com>
    ---
    drivers/w1/slaves/w1_ds2438.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/w1/slaves/w1_ds2438.c b/drivers/w1/slaves/w1_ds2438.c
    index eeb593294fbd..56e53a748059 100644
    --- a/drivers/w1/slaves/w1_ds2438.c
    +++ b/drivers/w1/slaves/w1_ds2438.c
    @@ -380,9 +380,9 @@ static ssize_t vdd_read(struct file *filp, struct kobject *kobj,
    if (!buf)
    return -EINVAL;

    - if (w1_ds2438_get_voltage(sl, DS2438_ADC_INPUT_VDD, &voltage) == 0) {
    + if (w1_ds2438_get_voltage(sl, DS2438_ADC_INPUT_VDD, &voltage) == 0)
    ret = snprintf(buf, count, "%u\n", voltage);
    - } else
    + else
    ret = -EIO;

    return ret;
    --
    2.30.1
    \
     
     \ /
      Last update: 2021-04-05 12:49    [W:3.056 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site