]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/ptp/ptp_qoriq.c
libata/ahci: Fix PCS quirk application
[linux.git] / drivers / ptp / ptp_qoriq.c
index 53775362aac633396993f12b98c837cc06c0651e..c61f00b72e156ad4da06c4093c19a248f810d570 100644 (file)
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * PTP 1588 clock for Freescale QorIQ 1588 timer
  *
  * Copyright (C) 2010 OMICRON electronics GmbH
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -467,6 +454,9 @@ int ptp_qoriq_init(struct ptp_qoriq *ptp_qoriq, void __iomem *base,
        unsigned long flags;
        u32 tmr_ctrl;
 
+       if (!node)
+               return -ENODEV;
+
        ptp_qoriq->base = base;
        ptp_qoriq->caps = *caps;