Commit b686562
nvme.i: fix crash on ctrl.discover() without a connection
Calling 'ctrl.discover()' without having called 'nvme.connect()'
first causes the application to crash horriby. So add a check for
an existing controller connection before trying to fetch the discovery
log page.
Signed-off-by: Hannes Reinecke <hare@suse.de>1 parent 32560ea commit b686562
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
748 | 750 | | |
749 | 751 | | |
750 | 752 | | |
| 753 | + | |
751 | 754 | | |
752 | 755 | | |
753 | 756 | | |
| |||
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
761 | 769 | | |
762 | 770 | | |
763 | 771 | | |
764 | 772 | | |
765 | | - | |
| 773 | + | |
766 | 774 | | |
767 | 775 | | |
768 | 776 | | |
| |||
0 commit comments