zdev: Fix segfault with unknown qeth attribute
This patch fixes a segfault in the qeth get_layer function that occurs
when an unknown attribute is used in combination with the force option.
@@ -1071,7 +1071,11 @@ static exit_code_t setting_ineffective(struct setting *s, int layer2)
static enum qeth_layer_type get_layer_type(struct setting *s)
{
- struct qeth_attrib_data *data = s->attrib->st_data;
+ struct qeth_attrib_data *data;
+
+ if (!s->attrib)
+ return layer_any;
+ data = s->attrib->st_data;
if (!data)
return layer_any;
