Home
last modified time | relevance | path

Searched hist:e0ee1fdb (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/samples/configfs/
H A Dconfigfs_sample.ce0ee1fdb Thu Sep 24 07:45:18 CDT 2020 Bartosz Golaszewski <bgolaszewski@baylibre.com> 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: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
e0ee1fdb Thu Sep 24 07:45:18 CDT 2020 Bartosz Golaszewski <bgolaszewski@baylibre.com> 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: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>