Commit a6016309 authored by Li Lingfeng's avatar Li Lingfeng
Browse files

Revert "scsi: ses: Handle enclosure with just a primary component gracefully"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9K8D1


CVE: NA

--------------------------------

This reverts commit b9b8b793.

Commit b9b8b793 ("scsi: ses: Handle enclosure with just a primary
component gracefully") tried to apply commit 176d7345b89c from stable.
However, it lost most of the changes without any descriptions. Revert
it and reapply the patch from stable later.

Fixes: b9b8b793 ("scsi: ses: Handle enclosure with just a primary component gracefully")
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
parent 3f7df988
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -728,6 +728,11 @@ static int ses_intf_add(struct device *cdev,
			components += type_ptr[1];
	}

	if (components == 0) {
		sdev_printk(KERN_WARNING, sdev, "enclosure has no enumerated components\n");
		goto err_free;
	}

	ses_dev->page1 = buf;
	ses_dev->page1_len = len;
	buf = NULL;