Skip to content

Commit f9ff564

Browse files
committed
Merge tag 'hsi-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Pull HSI updates from Sebastian Reichel: - misc small fixes * tag 'hsi-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi_core: Fix error handling in ssi_init() headers: Remove some left-over license text in include/uapi/linux/hsi/ HSI: omap_ssi_core: fix possible memory leak in ssi_probe() HSI: omap_ssi_core: fix unbalanced pm_runtime_disable() HSI: ssi_protocol: Fix return type of ssip_pn_xmit()
2 parents b220f31 + 3ffa9f7 commit f9ff564

File tree

4 files changed

+14
-34
lines changed

4 files changed

+14
-34
lines changed

drivers/hsi/clients/ssi_protocol.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ static void ssip_xmit_work(struct work_struct *work)
968968
ssip_xmit(cl);
969969
}
970970

971-
static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
971+
static netdev_tx_t ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
972972
{
973973
struct hsi_client *cl = to_hsi_client(dev->dev.parent);
974974
struct ssi_protocol *ssi = hsi_client_drvdata(cl);
@@ -1027,15 +1027,15 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
10271027
dev->stats.tx_packets++;
10281028
dev->stats.tx_bytes += skb->len;
10291029

1030-
return 0;
1030+
return NETDEV_TX_OK;
10311031
drop2:
10321032
hsi_free_msg(msg);
10331033
drop:
10341034
dev_kfree_skb(skb);
10351035
inc_dropped:
10361036
dev->stats.tx_dropped++;
10371037

1038-
return 0;
1038+
return NETDEV_TX_OK;
10391039
}
10401040

10411041
/* CMT reset event handler */

drivers/hsi/controllers/omap_ssi_core.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,10 @@ static int ssi_probe(struct platform_device *pd)
502502
platform_set_drvdata(pd, ssi);
503503

504504
err = ssi_add_controller(ssi, pd);
505-
if (err < 0)
505+
if (err < 0) {
506+
hsi_put_controller(ssi);
506507
goto out1;
508+
}
507509

508510
pm_runtime_enable(&pd->dev);
509511

@@ -536,9 +538,9 @@ static int ssi_probe(struct platform_device *pd)
536538
device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
537539
out2:
538540
ssi_remove_controller(ssi);
541+
pm_runtime_disable(&pd->dev);
539542
out1:
540543
platform_set_drvdata(pd, NULL);
541-
pm_runtime_disable(&pd->dev);
542544

543545
return err;
544546
}
@@ -629,7 +631,13 @@ static int __init ssi_init(void) {
629631
if (ret)
630632
return ret;
631633

632-
return platform_driver_register(&ssi_port_pdriver);
634+
ret = platform_driver_register(&ssi_port_pdriver);
635+
if (ret) {
636+
platform_driver_unregister(&ssi_pdriver);
637+
return ret;
638+
}
639+
640+
return 0;
633641
}
634642
module_init(ssi_init);
635643

include/uapi/linux/hsi/cs-protocol.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66
*
77
* Contact: Kai Vehmanen <[email protected]>
88
* Original author: Peter Ujfalusi <[email protected]>
9-
*
10-
* This program is free software; you can redistribute it and/or
11-
* modify it under the terms of the GNU General Public License
12-
* version 2 as published by the Free Software Foundation.
13-
*
14-
* This program is distributed in the hope that it will be useful, but
15-
* WITHOUT ANY WARRANTY; without even the implied warranty of
16-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17-
* General Public License for more details.
18-
*
19-
* You should have received a copy of the GNU General Public License
20-
* along with this program; if not, write to the Free Software
21-
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22-
* 02110-1301 USA
239
*/
2410

2511
#ifndef _CS_PROTOCOL_H

include/uapi/linux/hsi/hsi_char.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@
55
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
66
*
77
* Contact: Andras Domokos <andras.domokos at nokia.com>
8-
*
9-
* This program is free software; you can redistribute it and/or
10-
* modify it under the terms of the GNU General Public License
11-
* version 2 as published by the Free Software Foundation.
12-
*
13-
* This program is distributed in the hope that it will be useful, but
14-
* WITHOUT ANY WARRANTY; without even the implied warranty of
15-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16-
* General Public License for more details.
17-
*
18-
* You should have received a copy of the GNU General Public License
19-
* along with this program; if not, write to the Free Software
20-
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21-
* 02110-1301 USA
228
*/
239

2410
#ifndef __HSI_CHAR_H

0 commit comments

Comments
 (0)