Skip to content

Commit 93a97c5

Browse files
Dan Carpenterdavem330
authored andcommitted
ser_gigaset: return -ENOMEM on error instead of success
If we can't allocate the resources in gigaset_initdriver() then we should return -ENOMEM instead of zero. Fixes: 2869b23 ("[PATCH] drivers/isdn/gigaset: new M101 driver (v2)") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7b8076c commit 93a97c5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/isdn/gigaset/ser-gigaset.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,10 @@ static int __init ser_gigaset_init(void)
755755
driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS,
756756
GIGASET_MODULENAME, GIGASET_DEVNAME,
757757
&ops, THIS_MODULE);
758-
if (!driver)
758+
if (!driver) {
759+
rc = -ENOMEM;
759760
goto error;
761+
}
760762

761763
rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc);
762764
if (rc != 0) {

0 commit comments

Comments
 (0)