HSI changes for the 6.2 series

* misc. small fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmOc3c8ACgkQ2O7X88g7
 +pomVg//SE7I1Mwz+mVSSqt5aKtNE46TvcwDqC4qGa4mOK58mrZ/WJ5kK5MPL3gj
 EmEdJ5z0tzsOv675OLlPY28DhM6CLAHGmKkD7+Gu5cF5MxaIQNm9E24A0QPispjG
 s2ntEOIc0sJBQkZxb7oMfv21OF6ENyt3m/uhUpWEo8KBMcLRXfHdnluoqr+XZIc6
 K/P5qsWKwPxcFoFaW0lMlIMi8fD7mPrpl1IBHfFiwsbs+RraAQMCK9aFJHPJGRKh
 /PAWf/rxO9q71sHp6WBvR0QuHE8t7D2usfbDHYVN84/fw9Gh3zWTHQYxQy/ZdRvF
 OO4zFRHaOA6j3wlJ3WRJo5Bt2TWJOysjkNHbCe0X4oSILN38tmx/uyFIJB0MdBmw
 7/QSV3JRlToX1Q3p7+o6Gq0bpVJkjUkVJcLeqF3yu5wQFiTBrBS/CcP8G8K14FAX
 7PmzAN9mRAwNRUpAm+NCu1RP/RdwF6ugkRmk8iKpd5Jqc6wVYLPLQHFK/qzRMn5g
 xSIaacD67rr7TP+AFwkWJzVnIZJKT78gB0dL53lbmfBEeZA+V2CzvJdjFCaT1s5E
 qBpa15WQuM3q0CR0a5Mix6Vrz/KB+PEOKTVjY5ckFt9EHMDvhp+BcerMTnf/5Cks
 HY/uhFhim+9iQt96wC+MWV55VXLxpdLU2p8gNBDbDkJ+PerXAIA=
 =H70N
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2022-12-17 08:55:19 -06:00
commit f9ff5644bc
4 changed files with 14 additions and 34 deletions

View File

@ -968,7 +968,7 @@ static void ssip_xmit_work(struct work_struct *work)
ssip_xmit(cl); ssip_xmit(cl);
} }
static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct hsi_client *cl = to_hsi_client(dev->dev.parent); struct hsi_client *cl = to_hsi_client(dev->dev.parent);
struct ssi_protocol *ssi = hsi_client_drvdata(cl); struct ssi_protocol *ssi = hsi_client_drvdata(cl);
@ -1027,7 +1027,7 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++; dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
return 0; return NETDEV_TX_OK;
drop2: drop2:
hsi_free_msg(msg); hsi_free_msg(msg);
drop: drop:
@ -1035,7 +1035,7 @@ drop:
inc_dropped: inc_dropped:
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
return 0; return NETDEV_TX_OK;
} }
/* CMT reset event handler */ /* CMT reset event handler */

View File

@ -502,8 +502,10 @@ static int ssi_probe(struct platform_device *pd)
platform_set_drvdata(pd, ssi); platform_set_drvdata(pd, ssi);
err = ssi_add_controller(ssi, pd); err = ssi_add_controller(ssi, pd);
if (err < 0) if (err < 0) {
hsi_put_controller(ssi);
goto out1; goto out1;
}
pm_runtime_enable(&pd->dev); pm_runtime_enable(&pd->dev);
@ -536,9 +538,9 @@ out3:
device_for_each_child(&pd->dev, NULL, ssi_remove_ports); device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
out2: out2:
ssi_remove_controller(ssi); ssi_remove_controller(ssi);
pm_runtime_disable(&pd->dev);
out1: out1:
platform_set_drvdata(pd, NULL); platform_set_drvdata(pd, NULL);
pm_runtime_disable(&pd->dev);
return err; return err;
} }
@ -629,7 +631,13 @@ static int __init ssi_init(void) {
if (ret) if (ret)
return ret; return ret;
return platform_driver_register(&ssi_port_pdriver); ret = platform_driver_register(&ssi_port_pdriver);
if (ret) {
platform_driver_unregister(&ssi_pdriver);
return ret;
}
return 0;
} }
module_init(ssi_init); module_init(ssi_init);

View File

@ -6,20 +6,6 @@
* *
* Contact: Kai Vehmanen <kai.vehmanen@nokia.com> * Contact: Kai Vehmanen <kai.vehmanen@nokia.com>
* Original author: Peter Ujfalusi <peter.ujfalusi@nokia.com> * Original author: Peter Ujfalusi <peter.ujfalusi@nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/ */
#ifndef _CS_PROTOCOL_H #ifndef _CS_PROTOCOL_H

View File

@ -5,20 +5,6 @@
* Copyright (C) 2010 Nokia Corporation. All rights reserved. * Copyright (C) 2010 Nokia Corporation. All rights reserved.
* *
* Contact: Andras Domokos <andras.domokos at nokia.com> * Contact: Andras Domokos <andras.domokos at nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/ */
#ifndef __HSI_CHAR_H #ifndef __HSI_CHAR_H