Skip to content
Commit e0ee1fdb authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Christoph Hellwig
Browse files

samples: configfs: drop unnecessary ternary operators



Checking pointers for NULL value before passing them to container_of()
is pointless because even if we return NULL from the ternary operator,
none of the users checks the returned value but they instead dereference
it unconditionally. AFAICT this cannot really happen either. Simplify
the code by removing the ternary operators from to_childless() et al.

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 44724373
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment