From: Lars Ellenberg Date: Mon, 28 Apr 2014 16:43:35 +0000 (+0200) Subject: drbd: use list_first_entry_or_null in first_peer_device/first_connection X-Git-Tag: omap-for-v3.17/soc-cleanup~42^2~7^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec4a340789be16831ae96be5f7552238a7a6e903;p=pandora-kernel.git drbd: use list_first_entry_or_null in first_peer_device/first_connection If there are no peer_devices or connections, I'd rather have NULL than some "arbitrary" address pretending to point to a struct. Helps to avoid hard to debug symptoms, in case we ever try to use and dereference a drbd_connection or drbd_peer_device where we in fact don't have any connection at all. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- Reading git-diff-tree failed