Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ptp: ocp: Fix error handling in ptp_ocp_device_init

When device_add() fails, ptp_ocp_dev_release() will be called
after put_device(). Therefore, it seems that the
ptp_ocp_dev_release() before put_device() is redundant.

Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Vadim Feodrenko <vadim.fedorenko@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dinghao Liu and committed by
David S. Miller
caa0578c c889a99a

-1
-1
drivers/ptp/ptp_ocp.c
··· 3998 3998 return 0; 3999 3999 4000 4000 out: 4001 - ptp_ocp_dev_release(&bp->dev); 4002 4001 put_device(&bp->dev); 4003 4002 return err; 4004 4003 }