mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
nvdimm: Remove empty if statement
This patch removes an empty statement from an if expression and promotes the else statement to the if expression with the expression logic reversed. I feel this is more readable as the empty statement can lead to issues if any additional logic was ever added. Reviewed-by: Toshi Kani <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
1cfeb66e8e
commit
19418b0244
1 changed files with 2 additions and 3 deletions
|
|
@ -261,9 +261,8 @@ int nd_label_validate(struct nvdimm_drvdata *ndd)
|
|||
void nd_label_copy(struct nvdimm_drvdata *ndd, struct nd_namespace_index *dst,
|
||||
struct nd_namespace_index *src)
|
||||
{
|
||||
if (dst && src)
|
||||
/* pass */;
|
||||
else
|
||||
/* just exit if either destination or source is NULL */
|
||||
if (!dst || !src)
|
||||
return;
|
||||
|
||||
memcpy(dst, src, sizeof_namespace_index(ndd));
|
||||
|
|
|
|||
Loading…
Reference in a new issue