]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ptp: Fix pass zero to ERR_PTR() in ptp_clock_register
authorYueHaibing <yuehaibing@huawei.com>
Fri, 23 Nov 2018 01:54:55 +0000 (09:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:45:59 +0000 (19:45 +0100)
commitc7d8d629fd6998675278471cc8d6ffd7de6efc41
tree6bed368d97157201103ef83d3223b8562fa4d9da
parent0049727a4b991b227c03d43c6530fcbe3d2dc6fe
ptp: Fix pass zero to ERR_PTR() in ptp_clock_register

[ Upstream commit aea0a897af9e44c258e8ab9296fad417f1bc063a ]

Fix smatch warning:

drivers/ptp/ptp_clock.c:298 ptp_clock_register() warn:
 passing zero to 'ERR_PTR'

'err' should be set while device_create_with_groups and
pps_register_source fails

Fixes: 85a66e550195 ("ptp: create "pins" together with the rest of attributes")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ptp/ptp_clock.c