Skip to content

Commit 6a4ccbb

Browse files
Yang Erkungregkh
authored andcommitted
scsi: sg: Fix sysctl sg-big-buff register during sg_init()
[ Upstream commit 3033c47 ] Commit 26d1c80 ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c") made a mistake. sysctl sg-big-buff was not created because the call to register_sg_sysctls() was placed on the wrong code path. Fixes: 26d1c80 ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c") Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260127062044.3034148-2-yangerkun@huawei.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b9ab6cf commit 6a4ccbb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/sg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,13 +1689,13 @@ init_sg(void)
16891689
sg_sysfs_valid = 1;
16901690
rc = scsi_register_interface(&sg_interface);
16911691
if (0 == rc) {
1692+
register_sg_sysctls();
16921693
#ifdef CONFIG_SCSI_PROC_FS
16931694
sg_proc_init();
16941695
#endif /* CONFIG_SCSI_PROC_FS */
16951696
return 0;
16961697
}
16971698
class_unregister(&sg_sysfs_class);
1698-
register_sg_sysctls();
16991699
err_out:
17001700
unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), SG_MAX_DEVS);
17011701
return rc;

0 commit comments

Comments
 (0)