Skip to content

Commit 6cdb400

Browse files
ColinIanKingjic23
authored andcommitted
iio: admv1013: replace redundant ternary operator with just len
The variable ret is being assigned a return value and non-zero error return paths are taken at all stages. At the end of the function ret is always zero, so the ternary operator checking for zero ret is redundant and can be replaced with just len instead. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: David Lechner <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 805bbd3 commit 6cdb400

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/frequency/admv1013.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static ssize_t admv1013_write(struct iio_dev *indio_dev,
319319
return -EINVAL;
320320
}
321321

322-
return ret ? ret : len;
322+
return len;
323323
}
324324

325325
static int admv1013_update_quad_filters(struct admv1013_state *st)

0 commit comments

Comments
 (0)