Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
707a306c
Commit
707a306c
authored
Feb 24, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IEEE1394(r1162): Check return value for errors from hpsb_register_protocol.
parent
e07f4d38
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
14 deletions
+47
-14
drivers/ieee1394/dv1394.c
drivers/ieee1394/dv1394.c
+13
-5
drivers/ieee1394/raw1394.c
drivers/ieee1394/raw1394.c
+14
-4
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+8
-1
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+12
-4
No files found.
drivers/ieee1394/dv1394.c
View file @
707a306c
...
...
@@ -2610,24 +2610,32 @@ static void __exit dv1394_exit_module(void)
static
int
__init
dv1394_init_module
(
void
)
{
int
ret
;
cdev_init
(
&
dv1394_cdev
,
&
dv1394_fops
);
dv1394_cdev
.
owner
=
THIS_MODULE
;
kobject_set_name
(
&
dv1394_cdev
.
kobj
,
"dv1394"
);
if
(
cdev_add
(
&
dv1394_cdev
,
IEEE1394_DV1394_DEV
,
16
))
{
ret
=
cdev_add
(
&
dv1394_cdev
,
IEEE1394_DV1394_DEV
,
16
);
if
(
ret
)
{
printk
(
KERN_ERR
"dv1394: unable to register character device
\n
"
);
return
-
EIO
;
return
ret
;
}
devfs_mk_dir
(
"ieee1394/dv"
);
hpsb_register_highlevel
(
&
dv1394_highlevel
);
hpsb_register_protocol
(
&
dv1394_driver
);
ret
=
hpsb_register_protocol
(
&
dv1394_driver
);
if
(
ret
)
{
printk
(
KERN_ERR
"dv1394: failed to register protocol
\n
"
);
hpsb_unregister_highlevel
(
&
dv1394_highlevel
);
devfs_remove
(
"ieee1394/dv"
);
cdev_del
(
&
dv1394_cdev
);
return
ret
;
}
#ifdef CONFIG_COMPAT
{
int
ret
;
/* First compatible ones */
ret
=
register_ioctl32_conversion
(
DV1394_IOC_SHUTDOWN
,
NULL
);
ret
|=
register_ioctl32_conversion
(
DV1394_IOC_SUBMIT_FRAMES
,
NULL
);
...
...
drivers/ieee1394/raw1394.c
View file @
707a306c
...
...
@@ -2737,6 +2737,8 @@ static struct file_operations raw1394_fops = {
static
int
__init
init_raw1394
(
void
)
{
int
ret
;
hpsb_register_highlevel
(
&
raw1394_highlevel
);
devfs_mk_cdev
(
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
),
...
...
@@ -2745,16 +2747,24 @@ static int __init init_raw1394(void)
cdev_init
(
&
raw1394_cdev
,
&
raw1394_fops
);
raw1394_cdev
.
owner
=
THIS_MODULE
;
kobject_set_name
(
&
raw1394_cdev
.
kobj
,
RAW1394_DEVICE_NAME
);
if
(
cdev_add
(
&
raw1394_cdev
,
IEEE1394_RAW1394_DEV
,
1
))
{
ret
=
cdev_add
(
&
raw1394_cdev
,
IEEE1394_RAW1394_DEV
,
1
);
if
(
ret
)
{
HPSB_ERR
(
"raw1394 failed to register minor device block"
);
devfs_remove
(
RAW1394_DEVICE_NAME
);
hpsb_unregister_highlevel
(
&
raw1394_highlevel
);
return
-
EBUSY
;
return
ret
;
}
printk
(
KERN_INFO
"raw1394: /dev/%s device initialized
\n
"
,
RAW1394_DEVICE_NAME
);
HPSB_INFO
(
"raw1394: /dev/%s device initialized
"
,
RAW1394_DEVICE_NAME
);
hpsb_register_protocol
(
&
raw1394_driver
);
ret
=
hpsb_register_protocol
(
&
raw1394_driver
);
if
(
ret
)
{
HPSB_ERR
(
"raw1394: failed to register protocol"
);
cdev_del
(
&
raw1394_cdev
);
devfs_remove
(
RAW1394_DEVICE_NAME
);
hpsb_unregister_highlevel
(
&
raw1394_highlevel
);
return
ret
;
}
return
0
;
}
...
...
drivers/ieee1394/sbp2.c
View file @
707a306c
...
...
@@ -2801,6 +2801,8 @@ static Scsi_Host_Template scsi_driver_template = {
static
int
sbp2_module_init
(
void
)
{
int
ret
;
SBP2_DEBUG
(
"sbp2_module_init"
);
printk
(
KERN_INFO
"sbp2: %s
\n
"
,
version
);
...
...
@@ -2819,7 +2821,12 @@ static int sbp2_module_init(void)
/* Register our high level driver with 1394 stack */
hpsb_register_highlevel
(
&
sbp2_highlevel
);
hpsb_register_protocol
(
&
sbp2_driver
);
ret
=
hpsb_register_protocol
(
&
sbp2_driver
);
if
(
ret
)
{
SBP2_ERR
(
"Failed to register protocol"
);
hpsb_unregister_highlevel
(
&
sbp2_highlevel
);
return
ret
;
}
return
0
;
}
...
...
drivers/ieee1394/video1394.c
View file @
707a306c
...
...
@@ -1453,24 +1453,32 @@ static void __exit video1394_exit_module (void)
static
int
__init
video1394_init_module
(
void
)
{
int
ret
;
cdev_init
(
&
video1394_cdev
,
&
video1394_fops
);
video1394_cdev
.
owner
=
THIS_MODULE
;
kobject_set_name
(
&
video1394_cdev
.
kobj
,
VIDEO1394_DRIVER_NAME
);
ret
=
cdev_add
(
&
video1394_cdev
,
IEEE1394_VIDEO1394_DEV
,
16
);
if
(
cdev_add
(
&
video1394_cdev
,
IEEE1394_VIDEO1394_DEV
,
16
))
{
PRINT_G
(
KERN_ERR
,
"video1394: unable to get minor device block"
);
return
-
EIO
;
return
ret
;
}
devfs_mk_dir
(
VIDEO1394_DRIVER_NAME
);
hpsb_register_highlevel
(
&
video1394_highlevel
);
hpsb_register_protocol
(
&
video1394_driver
);
ret
=
hpsb_register_protocol
(
&
video1394_driver
);
if
(
ret
)
{
PRINT_G
(
KERN_ERR
,
"video1394: failed to register protocol"
);
hpsb_unregister_highlevel
(
&
video1394_highlevel
);
devfs_remove
(
VIDEO1394_DRIVER_NAME
);
cdev_del
(
&
video1394_cdev
);
return
ret
;
}
#ifdef CONFIG_COMPAT
{
int
ret
;
/* First the compatible ones */
ret
=
register_ioctl32_conversion
(
VIDEO1394_IOC_LISTEN_CHANNEL
,
NULL
);
ret
|=
register_ioctl32_conversion
(
VIDEO1394_IOC_UNLISTEN_CHANNEL
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment